summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2013-12-03 17:02:34 +0100
committerFridrich Štrba <fridrich.strba@bluewin.ch>2013-12-03 17:02:34 +0100
commit28b2a9fa25a2d02d4c525a9d2c19b1fe63d84d5b (patch)
tree3717bcb2a7b8ae80fcce54ee77319b8ff0bef36e /build
parent89b70dbef73050af48dcd908706d629c66025ac3 (diff)
Adding allHEADmaster
Diffstat (limited to 'build')
-rw-r--r--build/Makefile.am1
-rw-r--r--build/win32/.gitignore10
-rw-r--r--build/win32/Makefile.am7
-rwxr-xr-xbuild/win32/compile-resource46
-rw-r--r--build/win32/emfp2raw.dsp102
-rw-r--r--build/win32/emfp2xhtml.dsp102
-rw-r--r--build/win32/libemfp.dsp146
-rw-r--r--build/win32/libemfp.dsw57
-rwxr-xr-xbuild/win32/lt-compile-resource78
9 files changed, 549 insertions, 0 deletions
diff --git a/build/Makefile.am b/build/Makefile.am
new file mode 100644
index 0000000..0f81afe
--- /dev/null
+++ b/build/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = win32
diff --git a/build/win32/.gitignore b/build/win32/.gitignore
new file mode 100644
index 0000000..fe1a2bf
--- /dev/null
+++ b/build/win32/.gitignore
@@ -0,0 +1,10 @@
+Makefile
+Makefile.in
+Debug
+Release
+*.dep
+*.mak
+*.ncb
+*.opt
+*.plg
+*.suo
diff --git a/build/win32/Makefile.am b/build/win32/Makefile.am
new file mode 100644
index 0000000..46426ba
--- /dev/null
+++ b/build/win32/Makefile.am
@@ -0,0 +1,7 @@
+EXTRA_DIST = \
+ libemfp.dsw \
+ libemfp.dsp \
+ emfp2raw.dsp \
+ emfp2xhtml.dsp \
+ compile-resource \
+ lt-compile-resource
diff --git a/build/win32/compile-resource b/build/win32/compile-resource
new file mode 100755
index 0000000..6a37565
--- /dev/null
+++ b/build/win32/compile-resource
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+# Script to compile a resource file for a DLL if there is a .rc file
+# for it. The resource source file is supposed to contain a version
+# info section, that uses the string BUILDNUMBER as the least
+# significant part of the version numbers. This script replaces that
+# string with a "build number" before compiling the binary resource
+# file. The build number is kept between builds in a "stamp" file, and
+# incremented each time. (If there is no stamp file, build number 0 is
+# used.) The intention is that only the "official" maintainer of a DLL
+# keeps such a stamp file, and thus the DLLs he releases have
+# increasing version number resources, which can be used by an
+# installer program to decide whether to replace an existing DLL with
+# the same name.
+
+# This is just my (tml@iki.fi) idea, if somebody comes up with a
+# better way to generate version number resources, don't hesitate to
+# suggest.
+
+# The command line arguments are:
+# $1: the name of the .rc file to check
+# $2: the name of the resource object file to produce, if the rc file exists
+
+# Check if we have a resource file for this DLL.
+rcfile=$1
+resfile=$2
+if [ -f $rcfile ]; then
+ # Check if we have a build number stamp file.
+ basename=`basename $rcfile .rc`
+ if [ -f $basename-build.stamp ]; then
+ read number <$basename-build.stamp
+ buildnumber=$[number]
+ echo Build number $buildnumber
+ rm -rf $basename-build.stamp
+ else
+ echo Using zero as build number
+ buildnumber=0
+ fi
+
+ m4 -DBUILDNUMBER=$buildnumber <$rcfile >$$.rc &&
+ ${WINDRES-windres} $$.rc $resfile &&
+ rm $$.rc
+else
+ # Return failure
+ exit 1
+fi
diff --git a/build/win32/emfp2raw.dsp b/build/win32/emfp2raw.dsp
new file mode 100644
index 0000000..aafdccb
--- /dev/null
+++ b/build/win32/emfp2raw.dsp
@@ -0,0 +1,102 @@
+# Microsoft Developer Studio Project File - Name="emfp2raw" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=emfp2raw - Win32 Release
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "emfp2raw.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "emfp2raw.mak" CFG="emfp2raw - Win32 Release"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "emfp2raw - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "emfp2raw - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "emfp2raw - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+MTL=midl.exe
+# ADD BASE MTL /nologo /win32
+# ADD MTL /nologo /win32
+# ADD BASE CPP /nologo /MT /W3 /GX /Zi /I "..\..\src\lib" /I "libwpd-0.9" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /c
+# ADD CPP /nologo /MT /W3 /GX /I "..\..\src\lib" /I "libwpd-0.9" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /c
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 libemfp-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib /nologo /subsystem:console /machine:IX86 /out:"Release\bin\emfp2raw.exe" /libpath:"Release\lib"
+# ADD LINK32 libemfp-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib /nologo /subsystem:console /machine:IX86 /out:"Release\bin\emfp2raw.exe" /libpath:"Release\lib"
+# SUBTRACT LINK32 /nodefaultlib
+
+!ELSEIF "$(CFG)" == "emfp2raw - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+MTL=midl.exe
+# ADD BASE MTL /nologo /win32
+# ADD MTL /nologo /win32
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "\..\..\src\lib" /I "libwpd-0.9" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D "_CONSOLE" /GZ /c
+# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /I "..\..\src\lib" /I "libwpd-0.9" /D "_DEBUG" /D "DEBUG" /D "WIN32" /D "_CONSOLE" /GZ /c
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 libemfp-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib /nologo /subsystem:console /debug /machine:IX86 /out:"Debug\bin\emfp2raw.exe" /libpath:"Debug\lib"
+# ADD LINK32 libemfp-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib kernel32.lib /nologo /subsystem:console /debug /machine:IX86 /out:"Debug\bin\emfp2raw.exe" /libpath:"Debug\lib"
+# SUBTRACT LINK32 /nodefaultlib
+
+!ENDIF
+
+# Begin Target
+
+# Name "emfp2raw - Win32 Release"
+# Name "emfp2raw - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+# Begin Source File
+
+SOURCE=..\..\src\conv\raw\emfp2raw.cpp
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/build/win32/emfp2xhtml.dsp b/build/win32/emfp2xhtml.dsp
new file mode 100644
index 0000000..97080f9
--- /dev/null
+++ b/build/win32/emfp2xhtml.dsp
@@ -0,0 +1,102 @@
+# Microsoft Developer Studio Project File - Name="emfp2xhtml" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=emfp2xhtml - Win32 Release
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "emfp2xhtml.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "emfp2xhtml.mak" CFG="emfp2xhtml - Win32 Release"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "emfp2xhtml - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "emfp2xhtml - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "emfp2xhtml - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+MTL=midl.exe
+# ADD BASE MTL /nologo /win32
+# ADD MTL /nologo /win32
+# ADD BASE CPP /nologo /MT /W3 /GX /Zi /I "..\..\src\lib" /I "libwpd-0.9" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /c
+# ADD CPP /nologo /MT /W3 /GX /I "..\..\src\lib" /I "libwpd-0.9" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /c
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 libemfp-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib /nologo /subsystem:console /machine:IX86 /out:"Release\bin\emfp2xhtml.exe" /libpath:"Release\lib"
+# ADD LINK32 libemfp-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib /nologo /subsystem:console /machine:IX86 /out:"Release\bin\emfp2xhtml.exe" /libpath:"Release\lib"
+# SUBTRACT LINK32 /nodefaultlib
+
+!ELSEIF "$(CFG)" == "emfp2xhtml - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+MTL=midl.exe
+# ADD BASE MTL /nologo /win32
+# ADD MTL /nologo /win32
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\lib" /I "libwpd-0.9" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D "_CONSOLE" /GZ /c
+# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /I "..\..\src\lib" /I "libwpd-0.9" /D "_DEBUG" /D "DEBUG" /D "WIN32" /D "_CONSOLE" /GZ /c
+# ADD BASE RSC /l 0x409
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 libemfp-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib /nologo /subsystem:console /debug /machine:IX86 /out:"Debug\bin\emfp2xhtml.exe" /libpath:"Debug\lib"
+# ADD LINK32 libemfp-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib /nologo /subsystem:console /debug /machine:IX86 /out:"Debug\bin\emfp2xhtml.exe" /libpath:"Debug\lib"
+# SUBTRACT LINK32 /nodefaultlib
+
+!ENDIF
+
+# Begin Target
+
+# Name "emfp2xhtml - Win32 Release"
+# Name "emfp2xhtml - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+# Begin Source File
+
+SOURCE=..\..\src\conv\svg\emfp2xhtml.cpp
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/build/win32/libemfp.dsp b/build/win32/libemfp.dsp
new file mode 100644
index 0000000..42fa758
--- /dev/null
+++ b/build/win32/libemfp.dsp
@@ -0,0 +1,146 @@
+# Microsoft Developer Studio Project File - Name="libemfp" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Static Library" 0x0104
+
+CFG=libemfp - Win32 Release
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "libemfp.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "libemfp.mak" CFG="libemfp - Win32 Release"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "libemfp - Win32 Release" (based on "Win32 (x86) Static Library")
+!MESSAGE "libemfp - Win32 Debug" (based on "Win32 (x86) Static Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "libemfp - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /I "libwpd-0.9" /D "WIN32" /D "NDEBUG" /D "_LIB" /D "_CRT_SECURE_NO_WARNINGS" /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GR /GX /O2 /I "libwpd-0.9" /D "NDEBUG" /D "WIN32" /D "_LIB" /D "_CRT_SECURE_NO_WARNINGS" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"Release\lib\libemfp-0.0.lib"
+
+!ELSEIF "$(CFG)" == "libemfp - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "libwpd-0.9" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D "_LIB" /D "_CRT_SECURE_NO_WARNINGS" /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /GR /GX /ZI /Od /I "libwpd-0.9" /D "_DEBUG" /D "DEBUG" /D "WIN32" /D "_LIB" /D "_CRT_SECURE_NO_WARNINGS" /FD /GZ /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LIB32=link.exe -lib
+# ADD BASE LIB32 /nologo
+# ADD LIB32 /nologo /out:"Debug\lib\libemfp-0.0.lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "libemfp - Win32 Release"
+# Name "libemfp - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\src\lib\libemfp_utils.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\lib\EMFPCollector.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\lib\EMFPDocument.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\lib\EMFPParser.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\lib\EMFPStringVector.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\lib\EMFPSVGGenerator.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\..\src\lib\libemfp.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\lib\libemfp_utils.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\lib\EMFPCollector.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\lib\EMFPDocument.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\lib\EMFPParser.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\lib\EMFPStringVector.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\src\lib\EMFPSVGGenerator.h
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/build/win32/libemfp.dsw b/build/win32/libemfp.dsw
new file mode 100644
index 0000000..c26d04c
--- /dev/null
+++ b/build/win32/libemfp.dsw
@@ -0,0 +1,57 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "libemfp"=.\libemfp.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "emfp2xhtml"=.\emfp2xhtml.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libemfp
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "emfp2raw"=.\emfp2raw.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name libemfp
+ End Project Dependency
+}}}
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
diff --git a/build/win32/lt-compile-resource b/build/win32/lt-compile-resource
new file mode 100755
index 0000000..aeddb44
--- /dev/null
+++ b/build/win32/lt-compile-resource
@@ -0,0 +1,78 @@
+#!/bin/sh
+
+# Script to compile a resource file for a DLL in the same way that
+# libtool would, if it knew about .rc files.
+
+# This kinda sucks, but the alternative would be to teach autoconf,
+# automake, and libtool about compiling .rc files. That would be
+# doable, but waiting for those changes to propagate to official
+# versions of those tools would take some time.
+
+# The command line arguments are:
+# $1: the name of the .rc file to compile if it exists
+# $2: the name of the resource libtool object file to produce
+
+rcfile=$1
+lo=$2
+case "$lo" in
+*.lo)
+ resfile=.libs/`basename $lo .lo`.o
+ ;;
+*)
+ echo libtool object name should end with .lo
+ exit 1
+ ;;
+esac
+d=`dirname $0`
+
+# Create .libs if not there already
+[ ! -d .libs ] && mkdir .libs
+
+# Super-ugly hack: libtool can work in two ways on Win32: Either it
+# uses .lo files which are the real object files in "this" directory,
+# or it creates .o files in the .libs subdirectory, and the .lo file
+# is a small text file. We try to deduce which case this is by
+# checking if there are any .o files in .libs. This requires that the
+# resource file gets built last in the Makefile.
+
+o_files_in_dotlibs=`echo .libs/*.o`
+case "$o_files_in_dotlibs" in
+ .libs/\*.o)
+ use_script=false
+ ;;
+ *) use_script=true
+ ;;
+esac
+
+# Another way of working of libtool: When compiling with --enable-static and
+# --disable-shared options, the .lo file can be still a small text file, and
+# the .o files are created in the same directory as the .lo files.
+
+o_files_in_dot=`echo ./*.o`
+case "$o_files_in_dot" in
+ ./\*.o)
+ use_script=$use_script
+ ;;
+ *) use_script=true
+ ;;
+esac
+
+# Try to compile resource file
+$d/compile-resource $rcfile $resfile && {
+ if [ $use_script = true ]; then
+ # Handcraft a libtool object
+ # libtool checks for a second line matching "Generated by .* libtool"!
+ (echo "# $lo"
+ echo "# Generated by lt-compile-resource, compatible with libtool"
+ echo "pic_object=$resfile"
+ echo "non_pic_object=none") >$lo
+ else
+ mv $resfile $lo
+ fi
+ # Success
+ exit 0
+}
+
+# If unsuccessful (no .rc file, or some error in it) return failure
+
+exit 1