From ce12211eb012d56d20f00386211c62b2c2e0d5a0 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov <borisk@apache.org> Date: Mon, 22 Sep 2008 11:55:10 +0000 Subject: [PATCH] Allow use of the Windows transcoder and net accessor on Cygwin but only if the user explicitly asks for it. git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@697787 13f79535-47bb-0310-9956-ffa450edef68 --- m4/xerces_netaccessor_selection.m4 | 20 ++++++++++++++++++++ m4/xerces_transcoder_selection.m4 | 15 +++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/m4/xerces_netaccessor_selection.m4 b/m4/xerces_netaccessor_selection.m4 index 70f4d3cc1..39e3ea6f3 100644 --- a/m4/xerces_netaccessor_selection.m4 +++ b/m4/xerces_netaccessor_selection.m4 @@ -106,6 +106,26 @@ AC_DEFUN([XERCES_NETACCESSOR_SELECTION], [AC_MSG_RESULT(no)] ) ;; + cygwin*) + # Only add it to the list if the user explicitly asked + # for it. + # + list_add= + no_winsock=false + AC_CHECK_HEADERS([winsock2.h], [], [no_winsock=true]) + AC_MSG_CHECKING([whether to use the WinSock NetAccessor (Windows)]) + AS_IF([! $no_winsock], [ + AC_ARG_ENABLE([netaccessor-winsock], + AS_HELP_STRING([--enable-netaccessor-winsock], + [Enable winsock-based NetAccessor support]), + [AS_IF([test x"$enableval" = xyes], + [list_add=WINSOCK])]) + ]) + AS_IF([test x"$list_add" != x], + [na_list="$na_list -$list_add-"; AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no)] + ) + ;; esac diff --git a/m4/xerces_transcoder_selection.m4 b/m4/xerces_transcoder_selection.m4 index acef8bf62..baa069ac8 100644 --- a/m4/xerces_transcoder_selection.m4 +++ b/m4/xerces_transcoder_selection.m4 @@ -108,6 +108,21 @@ AC_DEFUN([XERCES_TRANSCODER_SELECTION], [AC_MSG_RESULT(no)] ) ;; + cygwin*) + # Only add it to the list if the user explicitly asked + # for it. + # + AC_MSG_CHECKING([whether to use the Windows Transcoder]) + AC_ARG_ENABLE([transcoder-windows], + AS_HELP_STRING([--enable-transcoder-windows], + [Enable Windows-based transcoder support]), + [AS_IF([test x"$enableval" = xyes], + [list_add=WINDOWS])]) + AS_IF([test x"$list_add" != x], + [tc_list="$tc_list -$list_add-"; AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no)] + ) + ;; esac # TODO: Tests for additional transcoders -- GitLab