changeset 3594:fa49ef305f59 trunk

Some buildsys fixes for Windows.
author Jonathan Schleifer <js@h3c.de>
date Sat, 22 Sep 2007 00:57:19 +0200
parents 85a49369c95f
children c72f82b2182b
files buildsys.mk.in m4/sharedlib.m4
diffstat 2 files changed, 12 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/buildsys.mk.in	Fri Sep 21 18:20:18 2007 +0200
+++ b/buildsys.mk.in	Sat Sep 22 00:57:19 2007 +0200
@@ -46,6 +46,7 @@
 PLUGIN_SUFFIX = @PLUGIN_SUFFIX@
 INSTALL_LIB = @INSTALL_LIB@
 UNINSTALL_LIB = @UNINSTALL_LIB@
+CLEAN_LIB = @CLEAN_LIB@
 LN_S = @LN_S@
 MKDIR_P = mkdir -p
 INSTALL = @INSTALL@
@@ -339,7 +340,7 @@
 		${DIR_LEAVE}; \
 	done
 	
-	for i in ${OBJS} ${CLEAN} .deps *~; do \
+	for i in ${OBJS} ${CLEAN} ${CLEAN_LIB} .deps *~; do \
 		if [ -f $$i -o -d $$i ]; then \
 			if rm -fr $$i; then \
 				${DELETE_OK}; \
--- a/m4/sharedlib.m4	Fri Sep 21 18:20:18 2007 +0200
+++ b/m4/sharedlib.m4	Sat Sep 22 00:57:19 2007 +0200
@@ -34,6 +34,7 @@
 			PLUGIN_SUFFIX='.impl'
 			INSTALL_LIB='${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$$i'
 			UNINSTALL_LIB='rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib'
+			CLEAN_LIB=''
 			;;
 		*-apple-*)
 			AC_MSG_RESULT(Mac OS X)
@@ -48,6 +49,7 @@
 			PLUGIN_SUFFIX='.impl'
 			INSTALL_LIB='${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$$i'
 			UNINSTALL_LIB='rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib'
+			CLEAN_LIB=''
 			;;
 		*-sun-* | *-openbsd-* | *-mirbsd-*)
 			AC_MSG_RESULT(Solaris)
@@ -62,20 +64,22 @@
 			PLUGIN_SUFFIX='.so'
 			INSTALL_LIB='${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR} && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR} ${DESTDIR}${libdir}/$$i'
 			UNINSTALL_LIB='rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}'
+			CLEAN_LIB=''
 			;;
 		*-*-mingw32)
 			AC_MSG_RESULT(MinGW32)
 			LIB_CPPFLAGS='-DPIC'
 			LIB_CFLAGS=''
-			LIB_LDFLAGS='-shared'
-			LIB_PREFIX=''
+			LIB_LDFLAGS='-shared -Wl,--out-implib,${LIB}.a'
+			LIB_PREFIX='lib'
 			LIB_SUFFIX='.dll'
 			PLUGIN_CPPFLAGS=''
 			PLUGIN_CFLAGS=''
 			PLUGIN_LDFLAGS=''
 			PLUGIN_SUFFIX='.dll'
-			INSTALL_LIB='${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i'
-			UNINSTALL_LIB='rm -f ${DESTDIR}${libdir}/$$i'
+			INSTALL_LIB='${INSTALL} -m 755 $$i ${DESTDIR}${bindir}/$$i && ${INSTALL} -m 755 $$i.a ${DESTDIR}${libdir}/$$i.a'
+			UNINSTALL_LIB='rm -f ${DESTDIR}${bindir}/$$i ${DESTDIR}${libdir}/$$i.a'
+			CLEAN_LIB='${LIB}.a'
 			;;
 		*)
 			AC_MSG_RESULT(POSIX)
@@ -90,6 +94,7 @@
 			PLUGIN_SUFFIX='.so'
 			INSTALL_LIB='${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}.0 && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.0 ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.0 ${DESTDIR}${libdir}/$$i'
 			UNINSTALL_LIB='rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}.0'
+			CLEAN_LIB=''
 			;;
 	esac
 
@@ -104,4 +109,5 @@
 	AC_SUBST(PLUGIN_SUFFIX)
 	AC_SUBST(INSTALL_LIB)
 	AC_SUBST(UNINSTALL_LIB)
+	AC_SUBST(CLEAN_LIB)
 ])