2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-22 19:08:59 +00:00

more build fixes

git-svn-id: svn+q:///qpdf/trunk@777 71b93d88-0707-0410-a8cf-f5a4172ac649
This commit is contained in:
Jay Berkenbilt 2009-10-11 00:44:23 +00:00
parent 2b5ac676ed
commit 444fab8f87
4 changed files with 67 additions and 39 deletions

31
README
View File

@ -8,6 +8,9 @@ Artistic License which may be found in the source distribution as
"Artistic-2.0". It is provided "as is" without express or implied
warranty.
Building on UNIX/Linux
======================
For UNIX and UNIX-like systems, you can usually get by with just
./configure
@ -17,8 +20,32 @@ make install
For more detailed general information, see the "INSTALL" file in this
directory.
For specific information about building qpdf on Windows, see
"README.windows".
Building on Windows
===================
QPDF is known to build and pass its test suite with mingw (gcc 4.4.0)
and Microsoft Visual C++ .NET 2008 Express. In both cases, cygwin is
required to run the test suite. Either cygwin or MSYS is required to
build as well in order to get make and other related tools. The MSVC
build has only been tested under cygwin. The mingw build requires
MSYS and will probably not work with cygwin.
For details on how to build under Windows, see README.windows.
Additional Notes on Build
=========================
QPDF's build system, inspired by abuild (http://www.abuild.org), can
optionally use its own built-in rules rather than using libtool and
obeying the compiler specified with configure. This can be enabled by
passing --with-buildrules=buildrules where buildrules corresponds to
one of the .mk files (other than rules.mk) in the make directory.
This should never be necessary on a UNIX system, but may be necessary
on a Windows system. See README.windows for details. There is a
gcc-linux.mk file enable "gcc-linux" build rules, but it is intended
to help test the build system; Linux users should build with the
"libtools" rules, which are enabled by default.
The QPDF package provides some executables and a software library. A
user's manual can be found in the "doc" directory. The docbook

View File

@ -21,9 +21,9 @@ If you have MSYS and Mingw installed, you can run configure as follows:
To build with msvc, you must be running in a shell environment that
puts the MSVC tools in your path. Then you can run
XXX WHAT?
CC=cl CXX="cl /TP /GR" CPPFLAGS=-DHAVE_VSNPRINTF ./configure --disable-test-compare-images --enable-build-external-libs --with-buildrules=msvc
./configure --disable-test-compare-images --enable-build-external-libs --with-buildrules=msvc
This is tested with MSVC .NET 2008 Express.
From there, run

View File

@ -84,6 +84,16 @@ else
AC_MSG_RESULT(no)
fi
AC_MSG_CHECKING(which build rules to use)
AC_SUBST(BUILDRULES)
AC_ARG_WITH(buildrules,
AS_HELP_STRING([--with-buildrules=rules],
[which build rules to use; see README]),
[BUILDRULES=$withval],
[BUILDRULES=libtool])
AC_MSG_RESULT($BUILDRULES)
if test "$BUILDRULES" != "msvc"; then
qpdf_USE_WALL=0
AC_MSG_CHECKING(for whether $CC supports -Wall)
oCFLAGS=$CFLAGS
@ -98,6 +108,7 @@ else
AC_MSG_RESULT(no)
CFLAGS=$oCFLAGS
fi
fi
if test "$BUILD_EXTERNAL_LIBS" = "0"; then
AC_MSG_CHECKING(for whether to use -Werror)
@ -118,15 +129,6 @@ if test "$BUILD_EXTERNAL_LIBS" = "0"; then
fi
fi
AC_MSG_CHECKING(which build rules to use)
AC_SUBST(BUILDRULES)
AC_ARG_WITH(buildrules,
AS_HELP_STRING([--with-buildrules=rules],
[which build rules to use; see README]),
[BUILDRULES=$withval],
[BUILDRULES=libtool])
AC_MSG_RESULT($BUILDRULES)
AC_SUBST(SKIP_TEST_COMPARE_IMAGES)
AC_ARG_ENABLE(test-compare-images,
AS_HELP_STRING([--enable-test-compare-images],

View File

@ -40,27 +40,26 @@ define makeslib
lib /nologo /OUT:$(2) $(1)
endef
# 1 2 3 4 5 6 7
# Usage: $(call makelib,objs,library,ldflags,libs,current,revision,age)
# 1 2 3 4 5
# Usage: $(call makelib,objs,library,current,revision,age)
define makelib
cl /nologo /Zi /Gy /EHsc /MD /LD /Fe$(basename $(2))$(5).dll $(1) \
cl /nologo /Zi /Gy /EHsc /MD /LD /Fe$(basename $(2))$(3).dll $(1) \
/link /incremental:no \
$(foreach L,$(subst -L,,$(3)),/LIBPATH:$(L)) \
$(foreach L,$(subst -l,,$(4)),$(L).lib)
if [ -f $(basename $(2))$(5).dll.manifest ]; then \
mt.exe -nologo -manifest $(basename $(2))$(5).dll.manifest \
-outputresource:$(basename $(2))$(5).dll\;2; \
$(foreach L,$(subst -L,,$(LDFLAGS)),/LIBPATH:$(L)) \
$(foreach L,$(subst -l,,$(LIBS)),$(L).lib)
if [ -f $(basename $(2))$(3).dll.manifest ]; then \
mt.exe -nologo -manifest $(basename $(2))$(3).dll.manifest \
-outputresource:$(basename $(2))$(3).dll\;2; \
fi
mv $(2)$(5).lib $(2).lib
endef
# 1 2 3 4
# Usage: $(call makebin,objs,binary,ldflags,libs)
# 1 2
# Usage: $(call makebin,objs,binary)
define makebin
cl /nologo /Zi /Gy /EHsc /MD $(1) \
/link /incremental:no /OUT:$(2) \
$(foreach L,$(subst -L,,$(3)),/LIBPATH:$(L)) \
$(foreach L,$(subst -l,,$(4)),$(L).lib)
$(foreach L,$(subst -L,,$(LDFLAGS)),/LIBPATH:$(L)) \
$(foreach L,$(subst -l,,$(LIBS)),$(L).lib)
if [ -f $(2).manifest ]; then \
mt.exe -nologo -manifest $(2).manifest \
-outputresource:$(2)\;2; \