summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@novell.com>2005-11-16 19:45:11 +0000
committerTor Lillqvist <tml@src.gnome.org>2005-11-16 19:45:11 +0000
commitd351d225618511973d3977069631286753bc478f (patch)
tree076c830451259a10ecf15c6150fc9d8419695be1
parent673e0d30edc06f4e51c1a159129010fc9a22149d (diff)
downloadlibcroco-d351d225618511973d3977069631286753bc478f.tar.gz
New file. libcroco-zip is used to build a libcroco distribution for Win32.
2005-11-16 Tor Lillqvist <tml@novell.com> * libcroco-zip.in: New file. libcroco-zip is used to build a libcroco distribution for Win32. * Makefile.am: Distribute libcroco-zip.in * configure.in: AC_SUBST also LIBCROCO_CURRENT and LIBCROCO_AGE as libcroco-zip needs them to construct the DLL name. Check for Win32, set OS_WIN32 Automake conditional. Expand libcroco-zip. * src/Makefile.am: Use -no-undefined on Win32. Link libcroco with GLIB2_LIBS and LIBXML2_LIBS.
-rw-r--r--ChangeLog14
-rw-r--r--Makefile.am2
-rw-r--r--configure.in13
-rwxr-xr-xlibcroco-zip.in25
-rw-r--r--src/Makefile.am7
5 files changed, 59 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 7ed6f9c..4a541f1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2005-11-16 Tor Lillqvist <tml@novell.com>
+
+ * libcroco-zip.in: New file. libcroco-zip is used to build a
+ libcroco distribution for Win32.
+
+ * Makefile.am: Distribute libcroco-zip.in
+
+ * configure.in: AC_SUBST also LIBCROCO_CURRENT and LIBCROCO_AGE as
+ libcroco-zip needs them to construct the DLL name. Check for
+ Win32, set OS_WIN32 Automake conditional. Expand libcroco-zip.
+
+ * src/Makefile.am: Use -no-undefined on Win32. Link libcroco with
+ GLIB2_LIBS and LIBXML2_LIBS.
+
Thu May 5 19:15:27 CEST 2005 Dodji Seketeli <dodji@gnome.org>
* src/cr-string.h, cr-parser.c: applied a patch from Peter Moulder
diff --git a/Makefile.am b/Makefile.am
index de357e2..d602a60 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -17,7 +17,7 @@ bin_SCRIPTS=$(CROCO_CONFIG_FILE)
#man_MANS = croco-config.1
EXTRA_DIST= croco-config.in $(PKG_CONFIG_FILE) TODO Doxyfile \
-HACKING COPYING.LIB COPYING libcroco.spec
+HACKING COPYING.LIB COPYING libcroco.spec libcroco-zip.in
all-local: $(PKG_CONFIG_FILE_UNINSTALLED) $(PKG_CONFIG_FILE) \
$(CROCO_CONFIG_FILE_UNINSTALLED) $(CROCO_CONFIG_FILE)
diff --git a/configure.in b/configure.in
index a9727f3..40abb63 100644
--- a/configure.in
+++ b/configure.in
@@ -28,6 +28,8 @@ AC_SUBST(LIBCROCO_MICRO_VERSION)
AC_SUBST(LIBCROCO_VERSION)
AC_SUBST(LIBCROCO_VERSION_INFO)
AC_SUBST(LIBCROCO_VERSION_NUMBER)
+AC_SUBST(LIBCROCO_CURRENT)
+AC_SUBST(LIBCROCO_AGE)
AC_SUBST(VERSION)
dnl
@@ -55,6 +57,16 @@ AC_ISC_POSIX
AM_PROG_LIBTOOL
+case "$host" in
+ *-*-mingw*)
+ os_win32=yes
+ ;;
+ *)
+ os_win32=no
+ ;;
+esac
+AM_CONDITIONAL(OS_WIN32, [test "$os_win32" = "yes"])
+
GTK_DOC_CHECK([1.0])
dnl **************************************************************
@@ -149,6 +161,7 @@ AC_OUTPUT([
Makefile
libcroco.pc
libcroco.spec
+libcroco-zip
croco-config
docs/Makefile
docs/examples/Makefile
diff --git a/libcroco-zip.in b/libcroco-zip.in
new file mode 100755
index 0000000..5b6e2ee
--- /dev/null
+++ b/libcroco-zip.in
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+# Build distribution zipfiles for libcroco on Win32: Runtime and
+# developer.
+
+ZIP=/tmp/libcroco-@VERSION@.zip
+DEVZIP=/tmp/libcroco-dev-@VERSION@.zip
+
+# The DLL name generated by libtool with the passed --version-info
+DLLNAME=libcroco-@LIBCROCO_MAJOR_VERSION@.@LIBCROCO_MINOR_VERSION@-`expr @LIBCROCO_CURRENT@ - @LIBCROCO_AGE@`.dll
+
+cd @prefix@
+rm $ZIP
+
+zip $ZIP -@ <<EOF
+bin/$DLLNAME
+EOF
+
+rm $DEVZIP
+zip -r $DEVZIP -@ <<EOF
+bin/csslint-@LIBCROCO_MAJOR_VERSION@.@LIBCROCO_MINOR_VERSION@.exe
+include/libcroco-@LIBCROCO_MAJOR_VERSION@.@LIBCROCO_MINOR_VERSION@
+lib/libcroco-@LIBCROCO_MAJOR_VERSION@.@LIBCROCO_MINOR_VERSION@.dll.a
+lib/pkgconfig/libcroco-@LIBCROCO_MAJOR_VERSION@.@LIBCROCO_MINOR_VERSION@.pc
+EOF
diff --git a/src/Makefile.am b/src/Makefile.am
index 9eeca3f..4745c21 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,3 +1,7 @@
+if OS_WIN32
+no_undefined = -no-undefined
+endif
+
#Headers files to be distributed
INSTALL_DIR_NAME=@PACKAGE@-@LIBCROCO_MAJOR_VERSION@.@LIBCROCO_MINOR_VERSION@
crocoincdir=$(includedir)/$(INSTALL_DIR_NAME)/libcroco
@@ -92,4 +96,5 @@ libcroco_0_6_la_SOURCES= $(SRCS)
INCLUDES=-I$(top_srcdir) -I$(top_srcdir)/intl \
-I $(top_builddir)/src @GLIB2_CFLAGS@ @LIBXML2_CFLAGS@
libcroco_0_6_la_LDFLAGS=-version-info @LIBCROCO_VERSION_INFO@ \
-@GLIB2_CFLAGS@
+@GLIB2_CFLAGS@ $(no_undefined)
+libcroco_0_6_la_LIBADD=@GLIB2_LIBS@ @LIBXML2_LIBS@