summaryrefslogtreecommitdiff
path: root/textproc/xerces-c2-devel/files/patch-aa
blob: e058afbec12b41f03b62c309fa1370bb25299c4e (plain) (blame)
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
--- samples/runConfigure.orig	Tue Jan 13 19:42:18 2004
+++ samples/runConfigure	Thu Mar 11 17:11:03 2004
@@ -271,8 +271,13 @@
                ;;
         esac
     elif test $platform = "freebsd"; then
-        threadingLibs="-pthread -lc_r"
-        threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS"
+      if test -n "${PTHREAD_LIBS}" ; then
+        threadingLibs="${PTHREAD_LIBS}"
+        threadingDefines="${PTHREAD_CFLAGS} -DXML_USE_PTHREADS"
+      else
+        threadingLibs="-lpthread"
+        threadingDefines="-DXML_USE_PTHREADS"
+      fi
     elif test $platform = "netbsd"; then
         threadingLibs="-pthread"
         threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS"
@@ -390,38 +395,6 @@
 #
 BITSTOBUILD=$bitsToBuild
 export BITSTOBUILD
-
-#
-# Special test for libiconv necessity under FreeBSD
-#
-transcodingLibs=""       # by default don't suppose the libiconv is necessary
-transcodingDefines=""
-if test $platform = "freebsd"; then
-    if test -n "${XERCESCROOT}"; then
-       # try lookup the configuration results
-       . "${XERCESCROOT}/version.incl"
-       SOLIBNAME=libxerces-c.so.${SO_TARGET_VERSION}.${SO_TARGET_VERSION_MAJOR}
-       if test -f "${XERCESCROOT}/src/xercesc/config.log" ; then
-           if grep XML_USE_LIBICONV "${XERCESCROOT}/src/xercesc/config.log" \
-              > /dev/null 2>&1 ; then
-               transcodingLibs=" -L/usr/local/lib -liconv "
-               transcodingDefines=" -DXML_USE_LIBICONV -I/usr/local/include "
-           fi
-       elif test -f "${XERCESCROOT}/obj/FREEBSD/IconvFBSDTransService.o" ; then
-           if nm "${XERCESCROOT}/obj/FREEBSD/IconvFBSDTransService.o" | \
-              grep iconv_open > /dev/null 2>&1 ; then
-               transcodingLibs=" -L/usr/local/lib -liconv "
-               transcodingDefines=" -DXML_USE_LIBICONV -I/usr/local/include "
-           fi
-       elif test -f "${XERCESCROOT}/lib/${SOLIBNAME}" ; then
-           if nm "${XERCESCROOT}/lib/${SOLIBNAME}" | \
-              grep iconv_open > /dev/null 2>&1 ; then
-               transcodingLibs=" -L/usr/local/lib -liconv "
-               transcodingDefines=" -DXML_USE_LIBICONV -I/usr/local/include "
-           fi
-       fi
-    fi
-fi
 
 #
 # Set the C compiler and C++ compiler environment variables
--- src/xercesc/runConfigure.orig	Wed Feb  4 13:26:44 2004
+++ src/xercesc/runConfigure	Thu Mar 11 17:10:00 2004
@@ -319,8 +319,13 @@
                ;;
         esac
     elif test $platform = "freebsd"; then
-        threadingLibs="-pthread -lc_r"
+      if test -n "${PTHREAD_LIBS}" ; then
+        threadingLibs="${PTHREAD_LIBS}"
+        threadingDefines="${PTHREAD_CFLAGS} -DXML_USE_PTHREADS"
+      else
+        threadingLibs="-lpthread"
         threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS"
+      fi
     elif test $platform = "netbsd"; then
         threadingLibs="-pthread -lpthread"
         threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS"
@@ -467,7 +472,11 @@
        TRANSCODER=Uniconv390 ;;
    IconvFBSD)
        TRANSCODER=IconvFBSD ;
-       transcodingDefines="-DXML_USE_LIBICONV -I/usr/local/include" ;;
+       transcodingDefines="-DXML_USE_LIBICONV -I/usr/local/include" ;
+       if test ${ICONVROOT}o != "o"; then
+	       ICONVROOT=/usr/local
+       fi
+       transcodingLibs="-L${ICONVROOT} -L${ICONVROOT}/lib -liconv" ;;
    IconvGNU)
        TRANSCODER=IconvGNU ;
        transcodingDefines="-DXML_USE_GNU_TRANSCODER -I/usr/local/include" ;;
--- tests/runConfigure.orig	Thu Mar 11 17:11:09 2004
+++ tests/runConfigure	Thu Mar 11 17:12:03 2004
@@ -270,8 +270,13 @@
                ;;
         esac
     elif test $platform = "freebsd"; then
-        threadingLibs="-pthread -lc_r"
-        threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS"
+      if test -n "${PTHREAD_LIBS}" ; then
+        threadingLibs="${PTHREAD_LIBS}"
+        threadingDefines="${PTHREAD_CFLAGS} -DXML_USE_PTHREADS"
+      else
+        threadingLibs="-lpthread"
+        threadingDefines="-DXML_USE_PTHREADS"
+      fi
     elif test $platform = "netbsd"; then
         threadingLibs="-pthread"
         threadingDefines="-D_THREAD_SAFE -DXML_USE_PTHREADS"
@@ -389,38 +394,6 @@
 #
 BITSTOBUILD=$bitsToBuild
 export BITSTOBUILD
-
-#
-# Special test for libiconv necessity under FreeBSD
-#
-transcodingLibs=""       # by default don't suppose the libiconv is necessary
-transcodingDefines=""
-if test $platform = "freebsd"; then
-    if test -n "${XERCESCROOT}"; then
-       # try lookup the configuration results
-       . "${XERCESCROOT}/version.incl"
-       SOLIBNAME=libxerces-c.so.${SO_TARGET_VERSION}.${SO_TARGET_VERSION_MAJOR}
-       if test -f "${XERCESCROOT}/src/xercesc/config.log" ; then
-           if grep XML_USE_LIBICONV "${XERCESCROOT}/src/xercesc/config.log" \
-              > /dev/null 2>&1 ; then
-               transcodingLibs=" -L/usr/local/lib -liconv "
-               transcodingDefines=" -DXML_USE_LIBICONV -I/usr/local/include "
-           fi
-       elif test -f "${XERCESCROOT}/obj/FREEBSD/IconvFBSDTransService.o" ; then
-           if nm "${XERCESCROOT}/obj/FREEBSD/IconvFBSDTransService.o" | \
-              grep iconv_open > /dev/null 2>&1 ; then
-               transcodingLibs=" -L/usr/local/lib -liconv "
-               transcodingDefines=" -DXML_USE_LIBICONV -I/usr/local/include "
-           fi
-       elif test -f "${XERCESCROOT}/lib/${SOLIBNAME}" ; then
-           if nm "${XERCESCROOT}/lib/${SOLIBNAME}" | \
-              grep iconv_open > /dev/null 2>&1 ; then
-               transcodingLibs=" -L/usr/local/lib -liconv "
-               transcodingDefines=" -DXML_USE_LIBICONV -I/usr/local/include "
-           fi
-       fi
-    fi
-fi
 
 #
 # Set the C compiler and C++ compiler environment variables