summaryrefslogtreecommitdiff
path: root/archivers/rpm5/files/patch-configure
blob: 71cbc70922151f6430356998f7f4efa981bb4861 (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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
--- configure.orig	Wed Feb 13 16:03:27 2002
+++ configure	Thu Mar  4 12:55:48 2004
@@ -186,6 +186,8 @@
 ac_help="$ac_help
   --with-libiconv-prefix=DIR  search for libiconv in DIR/include and DIR/lib"
 ac_help="$ac_help
+  --with-popt-prefix=DIR  search for popt in DIR/include and DIR/lib"
+ac_help="$ac_help
   --disable-nls           do not use Native Language Support"
 ac_help="$ac_help
   --with-included-gettext use the GNU gettext library included here"
@@ -6138,7 +6140,7 @@
 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
 
 # Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+LIBTOOL='%%LOCALBASE%%/bin/libtool13'
 
 # Prevent multiple expansion
 
@@ -7381,6 +7383,8 @@
 #  AC_DEFINE(HAVE_GZSEEK)
 #fi
 
+WITH_POPT_INCLUDE=$ac_default_prefix/include
+WITH_POPT_LIB=-L$ac_default_prefix/lib -lpopt
 
 
 
@@ -8335,6 +8339,47 @@
   DBLIBSRCS="$DBLIBSRCS db3.c"; libdb3="-ldb"
 else
   echo "$ac_t""no" 1>&6
+echo $ac_n "checking for db_create in -ldb3""... $ac_c" 1>&6
+echo "configure:8188: checking for db_create in -ldb3" >&5
+ac_lib_var=`echo db3'_'db_create | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-ldb3 $libthread $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 8196 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char db_create();
+
+int main() {
+db_create()
+; return 0; }
+EOF
+if { (eval echo configure:8207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  DBLIBSRCS="$DBLIBSRCS db3.c"; libdb3="-ldb3"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
 fi
 
       
@@ -8659,6 +8704,100 @@
 
 fi
 
+# Check whether --with-popt-prefix or --without-popt-prefix was given.
+if test "${with_popt_prefix+set}" = set; then
+  withval="$with_popt_prefix"
+  
+    for dir in `echo "$withval" | tr : ' '`; do
+      if test -d $dir/include; then
+        CPPFLAGS="$CPPFLAGS -I$dir/include";
+        WITH_POPT_INCLUDE="-I$dir/include";
+      fi
+      if test -d $dir/lib; then
+        LDFLAGS="$LDFLAGS -L$dir/lib";
+        WITH_POPT_LIB="-L$dir/lib -lpopt";
+      fi
+    done
+fi
+
+echo $ac_n "checking for popt.h""... $ac_c" 1>&6
+echo "configure:8724: checking for popt.h" >&5
+ac_lib_var=`echo popt'_'h | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="${WITH_POPT_INCLUDE}  $CPPFLAGS"
+cat > conftest.$ac_ext <<EOF
+#line 8494 "configure"
+#include "confdefs.h"
+#include <popt.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+
+int main() {
+return 0; }
+EOF
+if { (eval echo configure:8505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+CPPFLAGS="$ac_save_CPPFLAGS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+  echo "configure: error: sorry rpm requires popt.h" 1>&2; exit 1;
+fi
+
+echo $ac_n "checking for poptGetOptArg in -lpopt""... $ac_c" 1>&6
+echo "configure:8724: checking for poptGetOptArg in -lpopt" >&5
+ac_lib_var=`echo popt'_'poptGetOptArg | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="${WITH_POPT_LIB}  $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 8494 "configure"
+#include "confdefs.h"
+#include <popt.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+
+int main() {
+const char *foo = poptGetNextOpt(NULL);
+return 0; }
+EOF
+if { (eval echo configure:8505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+  echo "configure: error: sorry rpm requires libpopt" 1>&2; exit 1;
+fi
 
 
 for ac_func in personality
@@ -12512,6 +12651,37 @@
 WITH_PYTHON_VERSION=
 if test $withval = auto ; then
 
+  echo $ac_n "checking for python 2.3""... $ac_c" 1>&6
+echo "configure:12517: checking for python 2.3" >&5
+  if test "$cross_compiling" = yes; then
+  withval=yes
+else
+  cat > conftest.$ac_ext <<EOF
+#line 12522 "configure"
+#include "confdefs.h"
+
+#include <python2.3/Python.h>
+main() {
+  exit(strncmp("2.3", PY_VERSION, 3));
+} 
+EOF
+if { (eval echo configure:12530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  withval=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  withval=no
+fi
+rm -fr conftest*
+fi
+
+  echo "$ac_t""$withval" 1>&6
+  if test $withval = yes ; then
+    WITH_PYTHON_VERSION="2.3"
+  else
+
   echo $ac_n "checking for python 2.2""... $ac_c" 1>&6
 echo "configure:12517: checking for python 2.2" >&5
   if test "$cross_compiling" = yes; then
@@ -12577,6 +12747,8 @@
 
 fi
 
+fi
+
 if test -n "$WITH_PYTHON_VERSION" ; then
   WITH_PYTHON_SUBDIR=python
   WITH_PYTHON_SUBPACKAGE=1
@@ -13130,21 +13302,7 @@
 
 echo "$ac_t""$ROOT_GROUP" 1>&6
 
-
-if test "x$varprefix" = "x"; then
-    # For /usr and /usr/local, we want the 'var' directory to go
-    # in /var and /var/local respectively. For everything else, 
-    # just put the 'var' directory in prefix/var.
-    case $prefix in
-	/usr | /usr/local )
-	    varprefix=`echo $prefix | sed 's/usr/var/'` ;;
-	NONE)
- 	    varprefix=`echo $ac_default_prefix | sed 's/usr/var/'` ;;
-	*) 
-	    varprefix=$prefix/var ;;
-    esac	
-fi
-
+varprefix=/var
 
 if test "x$tmpdir" = "x"; then
     if test -d $varprefix/tmp; then
@@ -13349,7 +13507,7 @@
 
 
 
-subdirs="popt beecrypt zlib $WITH_DB_SUBDIR"
+subdirs="beecrypt $WITH_DB_SUBDIR"
 
 
 trap '' 1 2 15
@@ -13578,6 +13736,8 @@
 s%@WITH_ZLIB_SUBDIR@%$WITH_ZLIB_SUBDIR%g
 s%@WITH_ZLIB_INCLUDE@%$WITH_ZLIB_INCLUDE%g
 s%@WITH_ZLIB_LIB@%$WITH_ZLIB_LIB%g
+s%@WITH_POPT_INCLUDE@%$WITH_POPT_INCLUDE%g
+s%@WITH_POPT_LIB@%$WITH_POPT_LIB%g
 s%@WITH_DB_SUBDIR@%$WITH_DB_SUBDIR%g
 s%@WITH_INTERNAL_DB@%$WITH_INTERNAL_DB%g
 s%@DBLIBSRCS@%$DBLIBSRCS%g
@@ -13889,7 +14049,6 @@
           ;;
         esac
       done
-	echo timestamp > popt/stamp-h.in
 	echo timestamp > beecrypt/stamp-h.in
 	echo timestamp > stamp-h.in
   
@@ -13925,7 +14084,7 @@
     esac
   done
 
-  for ac_config_dir in popt beecrypt zlib $WITH_DB_SUBDIR; do
+  for ac_config_dir in beecrypt $WITH_DB_SUBDIR; do
 
     # Do not complain, so a configure script can configure whichever
     # parts of a large source tree are present.