diff options
author | Marc Mutz <marc@kdab.net> | 2009-04-17 14:07:25 +0200 |
---|---|---|
committer | Ralf Habacker <ralf.habacker@freenet.de> | 2009-12-01 08:36:26 +0100 |
commit | 83387d2ae08f96cd8d785382261a7cbae5bac9ca (patch) | |
tree | cf7e908c4505b915e96603f3e13a5d27112977af /configure.in | |
parent | 8ab7f05a1933aa6fc53d9e95c4aa9aa6fccd2235 (diff) |
WIN32: add versioninfo, and export symbols
* dbus/versioninfo.rc.in: (new file) copied and modified from libgpg-error
* configure.in: enable libtool's W32 support, extract version information
for use in versioninfo.rc.in, define DBUS_WIN, define DBUS_UNIX only on
unix (adapted from libgpg-error)
* dbus/Makefile.am: switch sources depending on platform,
compile versioninfo.rc, add dbus-1.def (not used since buildsystem creates
its own .def file apparently)
(cherry picked from commit cfa717ddb7b9258a862d87cd5b3bdbe582ce106c)
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/configure.in b/configure.in index 24ad5544..4360e2df 100644 --- a/configure.in +++ b/configure.in @@ -9,6 +9,8 @@ m4_define([dbus_version], AC_INIT(dbus, [dbus_version]) AC_CANONICAL_HOST +AC_LIBTOOL_WIN32_DLL +AC_LIBTOOL_RC AM_INIT_AUTOMAKE([1.9 tar-ustar]) AM_CONFIG_HEADER(config.h) @@ -63,6 +65,39 @@ AC_HEADER_STDC AC_C_INLINE AM_PROG_LIBTOOL +# Set some internal variables depending on the platform for later use. +dbus_win=no +dbus_unix=no +case "${host}" in + *-mingw32*) + dbus_win=yes + ;; + *) + dbus_unix=yes + ;; +esac + +# Special defines for certain platforms +if test "$dbus_win" = yes; then + AC_DEFINE(DBUS_WIN,1,[Defined if we run on a W32 API based system]) + BUILD_TIMESTAMP=`date --iso-8601=minutes` + AC_SUBST(BUILD_TIMESTAMP) + changequote(,)dnl + BUILD_FILEVERSION=`echo "$DBUS_VERSION" | sed 's/\([0-9.]*\).*/\1./;s/\./,/g'` + changequote([,])dnl + case "$DBUS_VERSION" in + *-rc*) BUILD_FILEVERSION="${BUILD_FILEVERSION}1" ;; + *) BUILD_FILEVERSION="${BUILD_FILEVERSION}2" ;; + esac +else + AC_DEFINE(DBUS_UNIX,1,[Defined if we run on a Unix-based system]) +fi +AC_SUBST(BUILD_TIMESTAMP) +AC_SUBST(BUILD_FILEVERSION) +AM_CONDITIONAL(DBUS_WIN, test "$dbus_win" = yes) +AM_CONDITIONAL(DBUS_UNIX, test "$dbus_unix" = yes) + + AC_ARG_ENABLE(tests, AS_HELP_STRING([--enable-tests],[enable unit test code]),enable_tests=$enableval,enable_tests=$USE_MAINTAINER_MODE) AC_ARG_ENABLE(ansi, AS_HELP_STRING([--enable-ansi],[enable -ansi -pedantic gcc flags]),enable_ansi=$enableval,enable_ansi=no) AC_ARG_ENABLE(verbose-mode, AS_HELP_STRING([--enable-verbose-mode],[support verbose debug mode]),enable_verbose_mode=$enableval,enable_verbose_mode=$USE_MAINTAINER_MODE) @@ -91,8 +126,6 @@ AC_ARG_WITH(console-owner-file, AS_HELP_STRING([--with-console-owner-file=[filen AC_ARG_WITH(dbus_user, AS_HELP_STRING([--with-dbus-user=<user>],[User for running the DBUS daemon (messagebus)])) AC_ARG_WITH(dbus_daemondir, AS_HELP_STRING([--with-dbus-daemondir=[dirname]],[Directory for installing the DBUS daemon])) -AC_DEFINE(DBUS_UNIX,1,[dbus on unix]) - dnl DBUS_BUILD_TESTS controls unit tests built in to .c files dnl and also some stuff in the test/ subdir AM_CONDITIONAL(DBUS_BUILD_TESTS, test x$enable_tests = xyes) @@ -1430,6 +1463,7 @@ AH_VERBATIM(_DARWIN_ENVIRON, AC_OUTPUT([ Doxyfile +dbus/versioninfo.rc dbus/dbus-arch-deps.h bus/system.conf bus/session.conf |