Add a stub for an option to export private internal functions

git-svn-id: svn+ssh://svn.code.sf.net/p/mingw-w64/code/trunk@3196 4407c894-4637-0410-b4f5-ada5f102cad1
diff --git a/mingw-w64-crt/configure b/mingw-w64-crt/configure
index 1640656..1242018 100755
--- a/mingw-w64-crt/configure
+++ b/mingw-w64-crt/configure
@@ -607,6 +607,8 @@
 CPP
 ENABLE_TESTS_UNICODE_FALSE
 ENABLE_TESTS_UNICODE_TRUE
+PRIVATE_EXPORTS_FALSE
+PRIVATE_EXPORTS_TRUE
 UNDERSCORES_FALSE
 UNDERSCORES_TRUE
 LIB32SUFFIXDIR
@@ -735,6 +737,7 @@
 enable_libce
 enable_wildcard
 enable_leading_underscores
+enable_private_exports
 enable_tests_unicode
 enable_warnings
 '
@@ -1383,6 +1386,8 @@
   --disable-leading-underscores
                           Disable leading underscores to match the MSVC
                           calling convention
+  --enable-private-exports
+                          Enable exporting private internal functions
   --enable-tests-unicode  Enable the unicode testsuite without testing the
                           compiler for support.
   --enable-warnings[=0-5] Enable compile time warnings [default=3]
@@ -5103,6 +5108,34 @@
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_leading_underscores" >&5
 $as_echo "$enable_leading_underscores" >&6; }
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable private exports" >&5
+$as_echo_n "checking whether to enable private exports... " >&6; }
+# Check whether --enable-private-exports was given.
+if test "${enable_private_exports+set}" = set; then :
+  enableval=$enable_private_exports;
+else
+  enable_private_exports=no
+fi
+
+case $enable_private_exports in #(
+  yes) :
+     ;; #(
+  no) :
+     ;; #(
+  *) :
+    as_fn_error "Please only use --enable-private-exports  or --disable-private-exports, without any additional arguments." "$LINENO" 5 ;;
+esac
+ if test $enable_private_exports = yes; then
+  PRIVATE_EXPORTS_TRUE=
+  PRIVATE_EXPORTS_FALSE='#'
+else
+  PRIVATE_EXPORTS_TRUE='#'
+  PRIVATE_EXPORTS_FALSE=
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_private_exports" >&5
+$as_echo "$enable_private_exports" >&6; }
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -municode" >&5
 $as_echo_n "checking whether the compiler supports -municode... " >&6; }
 # Check whether --enable-tests-unicode was given.
@@ -5769,6 +5802,10 @@
   as_fn_error "conditional \"UNDERSCORES\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
 fi
+if test -z "${PRIVATE_EXPORTS_TRUE}" && test -z "${PRIVATE_EXPORTS_FALSE}"; then
+  as_fn_error "conditional \"PRIVATE_EXPORTS\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
 if test -z "${ENABLE_TESTS_UNICODE_TRUE}" && test -z "${ENABLE_TESTS_UNICODE_FALSE}"; then
   as_fn_error "conditional \"ENABLE_TESTS_UNICODE\" was never defined.
 Usually this means the macro was only invoked conditionally." "$LINENO" 5
diff --git a/mingw-w64-crt/configure.ac b/mingw-w64-crt/configure.ac
index c955bbe..f2bba92 100644
--- a/mingw-w64-crt/configure.ac
+++ b/mingw-w64-crt/configure.ac
@@ -151,6 +151,19 @@
 AM_CONDITIONAL([UNDERSCORES],[test $enable_leading_underscores = yes])
 AC_MSG_RESULT([$enable_leading_underscores])
 
+AC_MSG_CHECKING([whether to enable private exports])
+AC_ARG_ENABLE([private-exports],
+  [AS_HELP_STRING([--enable-private-exports],
+    [Enable exporting private internal functions])],
+  [],
+  [enable_private_exports=no])
+AS_CASE([$enable_private_exports],
+  [yes],[],
+  [no],[],
+  [AC_MSG_ERROR([Please only use --enable-private-exports  or --disable-private-exports, without any additional arguments.])])
+AM_CONDITIONAL([PRIVATE_EXPORTS],[test $enable_private_exports = yes])
+AC_MSG_RESULT([$enable_private_exports])
+
 AC_MSG_CHECKING([whether the compiler supports -municode])
 AC_ARG_ENABLE([tests-unicode],
   [AS_HELP_STRING([--enable-tests-unicode],