diff options
author | Bruno Haible <bruno@clisp.org> | 2009-04-19 22:28:35 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-04-19 22:28:35 +0200 |
commit | ac7526fb13c91cef4fe569ddf7e6ee189fa74180 (patch) | |
tree | ffdb6d2a181bc079f97286f598507de20419f5cb /configure.ac | |
parent | 9c3f20cc1cae69edbb237cb07dbc9e3a8cf93528 (diff) | |
download | libunistring-ac7526fb13c91cef4fe569ddf7e6ee189fa74180.tar.gz |
Support for building as shared library on Cygwin and mingw.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 8bfd2b4..bcea482 100644 --- a/configure.ac +++ b/configure.ac @@ -57,6 +57,29 @@ dnl Checks for types, header files, functions and declarations. gl_INIT +dnl Compilation on mingw and Cygwin needs special Makefile rules, because +dnl 1. when we install a shared library, we must arrange to export +dnl auxiliary pointer variables for every exported variable, +dnl 2. when we install a shared library and a static library simultaneously, +dnl the include file specifies __declspec(dllimport) and therefore we +dnl must arrange to define the auxiliary pointer variables for the +dnl exported variables _also_ in the static library. +if test "$enable_shared" = yes; then + case "$host_os" in + mingw* | cygwin*) is_woe32dll=yes ;; + *) is_woe32dll=no ;; + esac +else + is_woe32dll=no +fi +AM_CONDITIONAL([WOE32DLL], [test $is_woe32dll = yes]) +if test $is_woe32dll = yes; then + DLL_VARIABLE='__declspec (dllimport)' +else + DLL_VARIABLE= +fi +AC_SUBST([DLL_VARIABLE]) + dnl Check for prerequisites of exported.sh. gt_GLOBAL_SYMBOL_PIPE @@ -72,5 +95,6 @@ AC_CONFIG_FILES([doc/Makefile], AC_CONFIG_FILES([gnulib-local/Makefile]) AC_CONFIG_FILES([lib/Makefile]) AC_CONFIG_FILES([lib/exported.sh]) +AC_CONFIG_FILES([lib/unistring/woe32dll.h:lib/unistring/woe32dll.in.h]) AC_CONFIG_FILES([tests/Makefile]) AC_OUTPUT |