mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
Make sure we don't build both shared and static at the same time on
2008-04-04 Tor Lillqvist <tml@novell.com> * configure.in: Make sure we don't build both shared and static at the same time on Windows. Put a #define for GLIB_STATIC_COMPILATION into glibconfig.h in the static case, so that the use of variables from libglib gets the dllimport stuff in the GLIB_VAR macro as defined in gtypes.h automatically correct. This means that a shared and static build of GLib can't be installed in the same prefix on Windows, which sucks a bit. But with variables in the GLib API, there isn't much we can do otherwise. The alternative would be to force the developer who compiles against a statically built GLib to use -DGLIB_STATIC_COMPILATION. svn path=/trunk/; revision=6820
This commit is contained in:
parent
285b31e7a5
commit
47d61b50f8
14
ChangeLog
14
ChangeLog
@ -1,3 +1,17 @@
|
||||
2008-04-04 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* configure.in: Make sure we don't build both shared and static at
|
||||
the same time on Windows. Put a #define for
|
||||
GLIB_STATIC_COMPILATION into glibconfig.h in the static case, so
|
||||
that the use of variables from libglib gets the dllimport stuff in
|
||||
the GLIB_VAR macro as defined in gtypes.h automatically
|
||||
correct. This means that a shared and static build of GLib can't
|
||||
be installed in the same prefix on Windows, which sucks a bit. But
|
||||
with variables in the GLib API, there isn't much we can do
|
||||
otherwise. The alternative would be to force the developer who
|
||||
compiles against a statically built GLib to use
|
||||
-DGLIB_STATIC_COMPILATION.
|
||||
|
||||
2008-04-03 Tor Lillqvist <tml@novell.com>
|
||||
|
||||
* configure.in: Don't enforce shared library build only on
|
||||
|
14
configure.in
14
configure.in
@ -485,6 +485,15 @@ if test "x$GCC" = "xyes"; then
|
||||
esac
|
||||
fi
|
||||
|
||||
if test "$glib_native_win32" = "yes"; then
|
||||
if test x$enable_static = xyes -a x$enable_shared = xyes; then
|
||||
AC_MSG_ERROR([Can not build both shared and static at the same time on Windows.])
|
||||
fi
|
||||
if test x$enable_static = xyes; then
|
||||
glib_win32_static_compilation=yes
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl DU4 native cc currently needs -std1 for ANSI mode (instead of K&R)
|
||||
dnl
|
||||
@ -2711,6 +2720,7 @@ $glib_atexit
|
||||
$glib_memmove
|
||||
$glib_defines
|
||||
$glib_os
|
||||
$glib_static_compilation
|
||||
|
||||
$glib_vacopy
|
||||
|
||||
@ -3189,6 +3199,10 @@ case $host in
|
||||
glib_os="#define G_OS_UNIX"
|
||||
;;
|
||||
esac
|
||||
glib_static_compilation=""
|
||||
if test x$glib_win32_static_compilation = xyes; then
|
||||
glib_static_compilation="#define GLIB_STATIC_COMPILATION 1"
|
||||
fi
|
||||
])
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
|
Loading…
Reference in New Issue
Block a user