summaryrefslogtreecommitdiff
path: root/security/cyrus-sasl/patches/patch-al
blob: 665d92539a92a1765d77abc359c00abacc25995f (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
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
$NetBSD: patch-al,v 1.1 2002/09/07 07:37:40 jlam Exp $

--- configure.orig	Fri Mar 23 17:48:12 2001
+++ configure
@@ -1364,6 +1364,47 @@ CPPFLAGS="-I/usr/local/include ${CPPFLAG
   fi
 
 
+# Extract the first word of "sed", so it can be a program name with args.
+set dummy sed; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1371: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_path_SED'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case "$SED" in
+  /*)
+  ac_cv_path_SED="$SED" # Let the user override the test with a path.
+  ;;
+  ?:/*)			 
+  ac_cv_path_SED="$SED" # Let the user override the test with a dos path.
+  ;;
+  *)
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do 
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_path_SED="$ac_dir/$ac_word"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_SED" && ac_cv_path_SED="no"
+  ;;
+esac
+fi
+SED="$ac_cv_path_SED"
+if test -n "$SED"; then
+  echo "$ac_t""$SED" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+if test "$SED" = "no"; then
+  { echo "configure: error: sed is required to build sasl-config" 1>&2; exit 1; }
+fi
+
+
 # Check whether --enable-static or --disable-static was given.
 if test "${enable_static+set}" = set; then
   enableval="$enable_static"
@@ -3599,8 +3640,41 @@ LIBS="$ac_save_LIBS"
 fi
 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
   echo "$ac_t""yes" 1>&6
+  ac_safe=`echo "des.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for des.h""... $ac_c" 1>&6
+echo "configure:3646: checking for des.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 3651 "configure"
+#include "confdefs.h"
+#include <des.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3656: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
   LIB_DES="-ldes";
-				       with_des=yes
+				with_des=yes
+else
+  echo "$ac_t""no" 1>&6
+with_des=no
+fi
+
 else
   echo "$ac_t""no" 1>&6
 with_des=no
@@ -3997,7 +4071,7 @@ fi
 
 if test "$gssapi" != no; then
   if test -d ${gssapi}; then
-     CPPFLAGS="$CPPFLAGS -I$gssapi/include"
+     CPPFLAGS="$CPPFLAGS -I$gssapi/include -I$gssapi/include/krb5"
      LDFLAGS="$LDFLAGS -L$gssapi/lib"
   fi
   ac_safe=`echo "gssapi.h" | sed 'y%./+-%__p_%'`
@@ -5000,6 +5074,35 @@ fi
 LTLIBOBJS=`echo "$LIBOBJS" | sed 's/\.o/.lo/g'`
 
 
+
+ac_safe=`echo "/dev/urandom" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for /dev/urandom""... $ac_c" 1>&6
+echo "configure:5081: checking for /dev/urandom" >&5
+if eval "test \"`echo '$''{'ac_cv_file_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+    { echo "configure: error: Cannot check for file existence when cross compiling" 1>&2; exit 1; }
+else
+  if test -r /dev/urandom; then
+    eval "ac_cv_file_$ac_safe=yes"
+  else
+    eval "ac_cv_file_$ac_safe=no"
+  fi
+fi
+fi
+if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  cat >> confdefs.h <<EOF
+#define SASL_DEV_RANDOM "/dev/urandom"
+EOF
+
+else
+  echo "$ac_t""no" 1>&6
+
+fi
+
+
 for ac_hdr in getopt.h unistd.h crypt.h pwd.h shadow.h paths.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
@@ -5474,6 +5577,7 @@ s%@MAKEINFO@%$MAKEINFO%g
 s%@SET_MAKE@%$SET_MAKE%g
 s%@CC@%$CC%g
 s%@CPP@%$CPP%g
+s%@SED@%$SED%g
 s%@build@%$build%g
 s%@build_alias@%$build_alias%g
 s%@build_cpu@%$build_cpu%g