1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
## 02_EAP-SIM_doesnt_need_openssl.dpatch by <Paul.Hampson@anu.edu.au>
4
## All lines beginning with `## DP:' are a description of the patch.
5
## DP: EAP-SIM does not require openssl to build
9
--- freeradius-1.0.2.orig/src/modules/rlm_eap/types/rlm_eap_sim/configure
10
+++ freeradius-1.0.2/src/modules/rlm_eap/types/rlm_eap_sim/configure
13
ac_default_prefix=/usr/local
14
# Any additions from configure.in:
16
- --with-openssl-includes=DIR Directory to look for OpenSSL include files"
18
- --with-openssl-libraries=DIR Directory to look for OpenSSL library files"
20
# Initialize some variables set by options.
21
# The variables have the same names as the options, with
23
# Extract the first word of "gcc", so it can be a program name with args.
24
set dummy gcc; ac_word=$2
25
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
26
-echo "configure:540: checking for $ac_word" >&5
27
+echo "configure:536: checking for $ac_word" >&5
28
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
29
echo $ac_n "(cached) $ac_c" 1>&6
32
# Extract the first word of "cc", so it can be a program name with args.
33
set dummy cc; ac_word=$2
34
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
35
-echo "configure:570: checking for $ac_word" >&5
36
+echo "configure:566: checking for $ac_word" >&5
37
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
38
echo $ac_n "(cached) $ac_c" 1>&6
41
# Extract the first word of "cl", so it can be a program name with args.
42
set dummy cl; ac_word=$2
43
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
44
-echo "configure:621: checking for $ac_word" >&5
45
+echo "configure:617: checking for $ac_word" >&5
46
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
47
echo $ac_n "(cached) $ac_c" 1>&6
52
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
53
-echo "configure:653: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
54
+echo "configure:649: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
57
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
60
cat > conftest.$ac_ext << EOF
62
-#line 664 "configure"
63
+#line 660 "configure"
68
-if { (eval echo configure:669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
69
+if { (eval echo configure:665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
70
ac_cv_prog_cc_works=yes
71
# If we can't run a trivial program, we are probably using a cross compiler.
72
if (./conftest; exit) 2>/dev/null; then
74
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
76
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
77
-echo "configure:695: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
78
+echo "configure:691: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
79
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
80
cross_compiling=$ac_cv_prog_cc_cross
82
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
83
-echo "configure:700: checking whether we are using GNU C" >&5
84
+echo "configure:696: checking whether we are using GNU C" >&5
85
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
86
echo $ac_n "(cached) $ac_c" 1>&6
92
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
93
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:705: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
98
ac_save_CFLAGS="$CFLAGS"
100
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
101
-echo "configure:728: checking whether ${CC-cc} accepts -g" >&5
102
+echo "configure:724: checking whether ${CC-cc} accepts -g" >&5
103
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
104
echo $ac_n "(cached) $ac_c" 1>&6
106
@@ -756,508 +752,6 @@
110
- # Check whether --with-openssl-includes or --without-openssl-includes was given.
111
-if test "${with_openssl_includes+set}" = set; then
112
- withval="$with_openssl_includes"
115
- rlm_eap_peap_inc_dir="$rlm_eap_peap_inc_dir $withval"
116
- SMART_CFLAGS="$SMART_CFLAGS -I$withval"
123
- # Check whether --with-openssl-libraries or --without-openssl-libraries was given.
124
-if test "${with_openssl_libraries+set}" = set; then
125
- withval="$with_openssl_libraries"
128
- rlm_eap_peap_lib_dir="$rlm_eap_peap_lib_dir $withval"
129
- SMART_LIBS="$SMART_LIBS -L$withval"
136
- smart_try_dir=$rlm_eap_peap_inc_dir
139
-ac_safe=`echo "openssl/ssl.h" | sed 'y%./+-%__pm%'`
140
-echo $ac_n "checking for openssl/ssl.h""... $ac_c" 1>&6
141
-echo "configure:791: checking for openssl/ssl.h" >&5
146
- old_CFLAGS="$CFLAGS"
147
- cat > conftest.$ac_ext <<EOF
148
-#line 798 "configure"
149
-#include "confdefs.h"
151
- #include <openssl/ssl.h>
156
-if { (eval echo configure:806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
160
- echo "configure: failed program was:" >&5
161
- cat conftest.$ac_ext >&5
167
- if test "x$smart_include" = "x"; then
170
-if test "x$LOCATE" != "x"; then
174
- for x in `${LOCATE} $file 2>/dev/null`; do
175
- base=`echo $x | sed "s%/${file}%%"`
176
- if test "x$x" = "x$base"; then
180
- dir=`${DIRNAME} $x 2>/dev/null`
181
- exclude=`echo ${dir} | ${GREP} /home`
182
- if test "x$exclude" != "x"; then
186
- already=`echo \$smart_include_dir ${DIRS} | ${GREP} ${dir}`
187
- if test "x$already" = "x"; then
193
-eval "smart_include_dir=\"\$smart_include_dir $DIRS\""
196
- for try in $smart_try_dir $smart_include_dir /usr/local/include/ /opt/include; do
197
- CFLAGS="$old_CFLAGS -I$try"
199
- cat > conftest.$ac_ext <<EOF
200
-#line 850 "configure"
201
-#include "confdefs.h"
203
- #include <openssl/ssl.h>
208
-if { (eval echo configure:858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
210
- smart_include="-I$try"
212
- echo "configure: failed program was:" >&5
213
- cat conftest.$ac_ext >&5
219
- if test "x$smart_include" != "x"; then
223
- CFLAGS="$old_CFLAGS"
226
- if test "x$smart_include" != "x"; then
227
- echo "$ac_t""yes" 1>&6
228
- eval "ac_cv_header_$ac_safe=yes"
229
- CFLAGS="$old_CFLAGS $smart_include"
230
- SMART_CFLAGS="$SMART_CFLAGS $smart_include"
232
- echo "$ac_t""no" 1>&6
235
- if test "x$ac_cv_header_openssl_ssl_h" != "xyes"; then
236
- fail="$fail (openssl/ssl.h)"
239
- smart_try_dir=$rlm_eap_peap_lib_dir
242
-sm_lib_safe=`echo "crypto" | sed 'y%./+-%__p_%'`
243
-sm_func_safe=`echo "DH_new" | sed 'y%./+-%__p_%'`
244
-echo $ac_n "checking for DH_new in -lcrypto""... $ac_c" 1>&6
245
-echo "configure:895: checking for DH_new in -lcrypto" >&5
251
- LIBS="$LIBS -lcrypto"
252
- cat > conftest.$ac_ext <<EOF
253
-#line 903 "configure"
254
-#include "confdefs.h"
255
-extern char DH_new();
260
-if { (eval echo configure:910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
262
- smart_lib="-lcrypto"
264
- echo "configure: failed program was:" >&5
265
- cat conftest.$ac_ext >&5
269
- if test "x$smart_lib" = "x"; then
272
-if test "x$LOCATE" != "x"; then
274
- file=libcrypto${libltdl_cv_shlibext}
276
- for x in `${LOCATE} $file 2>/dev/null`; do
277
- base=`echo $x | sed "s%/${file}%%"`
278
- if test "x$x" = "x$base"; then
282
- dir=`${DIRNAME} $x 2>/dev/null`
283
- exclude=`echo ${dir} | ${GREP} /home`
284
- if test "x$exclude" != "x"; then
288
- already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
289
- if test "x$already" = "x"; then
295
-eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
299
-if test "x$LOCATE" != "x"; then
303
- for x in `${LOCATE} $file 2>/dev/null`; do
304
- base=`echo $x | sed "s%/${file}%%"`
305
- if test "x$x" = "x$base"; then
309
- dir=`${DIRNAME} $x 2>/dev/null`
310
- exclude=`echo ${dir} | ${GREP} /home`
311
- if test "x$exclude" != "x"; then
315
- already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
316
- if test "x$already" = "x"; then
322
-eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
325
- for try in $smart_try_dir $smart_lib_dir /usr/local/lib/ /opt/lib; do
326
- LIBS="$old_LIBS -L$try -lcrypto"
328
- cat > conftest.$ac_ext <<EOF
329
-#line 979 "configure"
330
-#include "confdefs.h"
331
-extern char DH_new();
336
-if { (eval echo configure:986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
338
- smart_lib="-L$try -lcrypto"
340
- echo "configure: failed program was:" >&5
341
- cat conftest.$ac_ext >&5
344
- if test "x$smart_lib" != "x"; then
351
- if test "x$smart_lib" != "x"; then
352
- echo "$ac_t""yes" 1>&6
353
- eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
354
- LIBS="$old_LIBS $smart_lib"
355
- SMART_LIBS="$SMART_LIBS $smart_lib"
357
- echo "$ac_t""no" 1>&6
360
- if test "x$ac_cv_lib_crypto_DH_new" != "xyes"; then
361
- fail="$fail libcrypto"
366
-sm_lib_safe=`echo "ssl" | sed 'y%./+-%__p_%'`
367
-sm_func_safe=`echo "SSL_new" | sed 'y%./+-%__p_%'`
368
-echo $ac_n "checking for SSL_new in -lssl""... $ac_c" 1>&6
369
-echo "configure:1019: checking for SSL_new in -lssl" >&5
376
- cat > conftest.$ac_ext <<EOF
377
-#line 1027 "configure"
378
-#include "confdefs.h"
379
-extern char SSL_new();
384
-if { (eval echo configure:1034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
388
- echo "configure: failed program was:" >&5
389
- cat conftest.$ac_ext >&5
393
- if test "x$smart_lib" = "x"; then
396
-if test "x$LOCATE" != "x"; then
398
- file=libssl${libltdl_cv_shlibext}
400
- for x in `${LOCATE} $file 2>/dev/null`; do
401
- base=`echo $x | sed "s%/${file}%%"`
402
- if test "x$x" = "x$base"; then
406
- dir=`${DIRNAME} $x 2>/dev/null`
407
- exclude=`echo ${dir} | ${GREP} /home`
408
- if test "x$exclude" != "x"; then
412
- already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
413
- if test "x$already" = "x"; then
419
-eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
423
-if test "x$LOCATE" != "x"; then
427
- for x in `${LOCATE} $file 2>/dev/null`; do
428
- base=`echo $x | sed "s%/${file}%%"`
429
- if test "x$x" = "x$base"; then
433
- dir=`${DIRNAME} $x 2>/dev/null`
434
- exclude=`echo ${dir} | ${GREP} /home`
435
- if test "x$exclude" != "x"; then
439
- already=`echo \$smart_lib_dir ${DIRS} | ${GREP} ${dir}`
440
- if test "x$already" = "x"; then
446
-eval "smart_lib_dir=\"\$smart_lib_dir $DIRS\""
449
- for try in $smart_try_dir $smart_lib_dir /usr/local/lib/ /opt/lib; do
450
- LIBS="$old_LIBS -L$try -lssl"
452
- cat > conftest.$ac_ext <<EOF
453
-#line 1103 "configure"
454
-#include "confdefs.h"
455
-extern char SSL_new();
460
-if { (eval echo configure:1110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
462
- smart_lib="-L$try -lssl"
464
- echo "configure: failed program was:" >&5
465
- cat conftest.$ac_ext >&5
468
- if test "x$smart_lib" != "x"; then
475
- if test "x$smart_lib" != "x"; then
476
- echo "$ac_t""yes" 1>&6
477
- eval "ac_cv_lib_${sm_lib_safe}_${sm_func_safe}=yes"
478
- LIBS="$old_LIBS $smart_lib"
479
- SMART_LIBS="$SMART_LIBS $smart_lib"
481
- echo "$ac_t""no" 1>&6
484
- if test "x$ac_cv_lib_ssl_SSL_new" != "xyes"; then
485
- fail="$fail libssl"
488
- echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
489
-echo "configure:1139: checking how to run the C preprocessor" >&5
490
-# On Suns, sometimes $CPP names a directory.
491
-if test -n "$CPP" && test -d "$CPP"; then
494
-if test -z "$CPP"; then
495
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
496
- echo $ac_n "(cached) $ac_c" 1>&6
498
- # This must be in double quotes, not single quotes, because CPP may get
499
- # substituted into the Makefile and "${CC-cc}" will confuse make.
501
- # On the NeXT, cc -E runs the code through the compiler's parser,
502
- # not just through cpp.
503
- cat > conftest.$ac_ext <<EOF
504
-#line 1154 "configure"
505
-#include "confdefs.h"
509
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
510
-{ (eval echo configure:1160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
511
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
512
-if test -z "$ac_err"; then
516
- echo "configure: failed program was:" >&5
517
- cat conftest.$ac_ext >&5
519
- CPP="${CC-cc} -E -traditional-cpp"
520
- cat > conftest.$ac_ext <<EOF
521
-#line 1171 "configure"
522
-#include "confdefs.h"
526
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
527
-{ (eval echo configure:1177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
528
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
529
-if test -z "$ac_err"; then
533
- echo "configure: failed program was:" >&5
534
- cat conftest.$ac_ext >&5
536
- CPP="${CC-cc} -nologo -E"
537
- cat > conftest.$ac_ext <<EOF
538
-#line 1188 "configure"
539
-#include "confdefs.h"
543
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
544
-{ (eval echo configure:1194: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
545
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
546
-if test -z "$ac_err"; then
550
- echo "configure: failed program was:" >&5
551
- cat conftest.$ac_ext >&5
560
- ac_cv_prog_CPP="$CPP"
562
- CPP="$ac_cv_prog_CPP"
564
- ac_cv_prog_CPP="$CPP"
566
-echo "$ac_t""$CPP" 1>&6
573
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
574
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
575
-echo "configure:1225: checking for $ac_hdr" >&5
576
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
577
- echo $ac_n "(cached) $ac_c" 1>&6
579
- cat > conftest.$ac_ext <<EOF
580
-#line 1230 "configure"
581
-#include "confdefs.h"
584
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
585
-{ (eval echo configure:1235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
586
-ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
587
-if test -z "$ac_err"; then
589
- eval "ac_cv_header_$ac_safe=yes"
592
- echo "configure: failed program was:" >&5
593
- cat conftest.$ac_ext >&5
595
- eval "ac_cv_header_$ac_safe=no"
599
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
600
- echo "$ac_t""yes" 1>&6
601
- ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
602
- cat >> confdefs.h <<EOF
603
-#define $ac_tr_hdr 1
607
- echo "$ac_t""no" 1>&6
612
targetname=rlm_eap_sim
616
s%@infodir@%$infodir%g
620
s%@eap_sim_ldflags@%$eap_sim_ldflags%g
621
s%@eap_sim_cflags@%$eap_sim_cflags%g
622
s%@targetname@%$targetname%g
623
--- freeradius-1.0.2.orig/src/modules/rlm_eap/types/rlm_eap_sim/configure.in
624
+++ freeradius-1.0.2/src/modules/rlm_eap/types/rlm_eap_sim/configure.in
630
- dnl # extra argument: --openssl-includes=dir
632
- AC_ARG_WITH(openssl-includes,
633
- [ --with-openssl-includes=DIR Directory to look for OpenSSL include files],
634
- [ case "$withval" in
636
- rlm_eap_peap_inc_dir="$rlm_eap_peap_inc_dir $withval"
637
- SMART_CFLAGS="$SMART_CFLAGS -I$withval"
643
- dnl # extra argument: --openssl-libraries=dir
645
- AC_ARG_WITH(openssl-libraries,
646
- [ --with-openssl-libraries=DIR Directory to look for OpenSSL library files],
647
- [ case "$withval" in
649
- rlm_eap_peap_lib_dir="$rlm_eap_peap_lib_dir $withval"
650
- SMART_LIBS="$SMART_LIBS -L$withval"
655
- smart_try_dir=$rlm_eap_peap_inc_dir
656
- AC_SMART_CHECK_INCLUDE(openssl/ssl.h)
657
- if test "x$ac_cv_header_openssl_ssl_h" != "xyes"; then
658
- fail="$fail (openssl/ssl.h)"
661
- smart_try_dir=$rlm_eap_peap_lib_dir
662
- AC_SMART_CHECK_LIB(crypto, DH_new)
663
- if test "x$ac_cv_lib_crypto_DH_new" != "xyes"; then
664
- fail="$fail libcrypto"
667
- AC_SMART_CHECK_LIB(ssl, SSL_new)
668
- if test "x$ac_cv_lib_ssl_SSL_new" != "xyes"; then
669
- fail="$fail libssl"
672
- AC_CHECK_HEADERS( \