summaryrefslogtreecommitdiff
path: root/dev-libs/xerces-c/files/xerces-c-3.1.4-fix-build-system.patch
blob: 6b991d24b56f39b68db1741aca4368abd775ba5f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
* Fix build system when USE="-threads"
* Add DESTDIR in order to prevent sandbox failure

--- a/configure.ac
+++ b/configure.ac
@@ -124,6 +124,7 @@
 AC_CXX_HAVE_LSTRING
 
 ACX_PTHREAD
+AM_CONDITIONAL([THREADS], [test "x${acx_pthread_ok}" = "xyes"])
 
 # Checks for library functions.
 #AC_FUNC_ERROR_AT_LINE
--- a/src/xercesc/util/MsgLoaders/MsgCatalog/Makefile.in
+++ b/src/xercesc/util/MsgLoaders/MsgCatalog/Makefile.in
@@ -5,7 +5,7 @@
 prefix = @prefix@
 INSTALL = @INSTALL@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
-mkdir_p = @mkdir_p@
+mkdir_p = @MKDIR_P@
 
 include $(top_srcdir)/version.incl
 
@@ -48,11 +48,11 @@
 # for installing the library
 # for installing the library
 install: $(RESTARGET)
-	$(mkdir_p) $(prefix)/msg
-	$(INSTALL_PROGRAM) $(RESTARGET) $(prefix)/msg
+	$(mkdir_p) $(DESTDIR)/$(prefix)/share/xerces-c/msg
+	$(INSTALL_PROGRAM) $(RESTARGET) $(DESTDIR)/$(prefix)/share/xerces-c/msg
 
 uninstall: 
-	-rm -f $(prefix)/msg/$(RESFILES)
+	-rm -f $(DESTDIR)/$(prefix)/share/xerces-c/msg/$(RESFILES)
 
 
 # Needed to support "make dist"
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -21,7 +21,7 @@
 
 check_PROGRAMS =                                ${testprogs}
 
-LDADD =	                                        ${top_builddir}/src/libxerces-c.la
+LDADD =	                                        $(top_builddir)/src/libxerces-c.la $(PTHREAD_LIBS)
 # the  -I${top_builddir}/src is needed to pick the xercesc/util/Xerces_autoconf_config.hpp 
 # header file when doing out-of-tree builds
 AM_CPPFLAGS =                                   -I${top_builddir}/src -I${top_srcdir}/src
@@ -86,8 +86,10 @@
 #                                               src/ParserTest/ParserTest_Parser.cpp \
 #                                               src/ParserTest/ParserTest_Parser.hpp
 
+if THREADS
 testprogs +=                                    ThreadTest
 ThreadTest_SOURCES =                            src/ThreadTest/ThreadTest.cpp
+endif
 
 # Fails to compile under gcc 4 (ambiguous calls to NullPointerException)
 # dcargill says this is obsolete and we can delete it.