forked from vanhauser-thc/thc-hydra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure
executable file
·1807 lines (1732 loc) · 52 KB
/
configure
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
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#!/bin/sh
#
# uname -s = Linux | OpenBSD | FreeBSD | Darwin
# uname -m = i636 or x86_64
if [ "$1" = "-h" -o "$1" = "--help" ]; then
echo Options:
echo " --prefix=path path to install hydra and its datafiles to"
echo " --fhs install according to the File System Hierarchy Standard"
echo " --with-oracle=prefix prefix for oracle include dir"
echo " --with-oracle-lib=prefix prefix for oracle lib dir"
echo " --with-ssl=prefix prefix for SSL headers"
echo " --with-ssl-lib=prefix prefix for SSL libraries"
echo " --disable-xhydra disable compilation of hydra GUI"
echo " --nostrip do not per default strip binaries before install"
echo " --debug show debug output to trace errors"
echo " --help this here"
echo
echo If the CC environment variable is set, this is used as the compiler for the configure tests. The default is \"gcc\" otherwise.
echo You can also set PKG_CONFIG if necessary.
exit 0
fi
test -z "$CC" && CC=gcc
test -z "$PKG_CONFIG" && PKG_CONFIG=pkg-config
FHS=""
SIXFOUR=""
DEBUG=""
PREFIX=""
NOSTRIP=""
ORACLE_PATH=""
ORACLE_IPATH=""
WORACLE_PATH=""
WORACLE_LIB_PATH=""
SSL_PATH=""
SSL_IPATH=""
WSSL_PATH=""
WSSL_LIB_PATH=""
CURSES_PATH=""
CURSES_IPATH=""
CRYPTO_PATH=""
GPGERROR_IPATH=""
IDN_PATH=""
IDN_IPATH=""
PR29_IPATH=""
PCRE_PATH=""
PCRE_IPATH=""
POSTGRES_PATH=""
FIREBIRD_PATH=""
FIREBIRD_IPATH=""
MYSQL_PATH=""
MYSQL_IPATH=""
MCACHED_PATH=""
MCACHED_IPATH=""
MONGODB_PATH=""
MONGODB_IPATH=""
BSON_PATH=""
BSON_IPATH=""
AFP_PATH=""
AFP_IPATH=""
NCP_PATH=""
NCP_IPATH=""
SVN_PATH=""
SVN_IPATH=""
APR_IPATH=""
SAPR3_PATH=""
SAPR3_IPATH=""
SSH_PATH=""
SSH_IPATH=""
NSL_PATH=""
SOCKET_PATH=""
MANDIR=""
XHYDRA_SUPPORT=""
FREERDP2_PATH=""
WINPR2_PATH=""
FREERDP3_PATH=""
WINPR3_PATH=""
SMBC_PATH=""
SMBC_IPATH=""
if [ '!' "X" = "X$*" ]; then
while [ $# -gt 0 ] ; do
if [ "X" = "X$PREFIX" ]; then
PREFIX_TMP=`echo "$1"|sed 's/.*--prefix=//'`
if [ "$PREFIX_TMP" != "$1" ]; then
PREFIX=$PREFIX_TMP
fi
fi
if [ "X" = "X$NOSTRIP" ]; then
NOSTRIP_TMP=`echo "$1"|sed 's/.*--nostrip//'`
if [ -z "$NOSTRIP_TMP" ]; then
NOSTRIP="yes"
fi
fi
if [ "X" = "X$FHS" ]; then
FHS_TMP=`echo "$1"|sed 's/.*--fhs//'`
if [ -z "$FHS_TMP" ]; then
FHS="yes"
fi
fi
if [ "X" = "X$DEBUG" ]; then
DEBUG_TMP=`echo "$1"|sed 's/.*--debug//'`
if [ -z "$DEBUG_TMP" ]; then
DEBUG="yes"
fi
fi
if [ "X" = "X$XHYDRA_SUPPORT" ]; then
XHYDRA_SUPPORT_TMP=`echo "$1"|sed 's/.*--disable-xhydra//'`
if [ -z "$XHYDRA_SUPPORT_TMP" ]; then
XHYDRA_SUPPORT="disable"
fi
fi
if [ "X" = "X$WORACLE_PATH" ]; then
WORACLE_PATH_TMP=`echo "$1"|sed 's/.*--with-oracle=//'`
if [ "$WORACLE_PATH_TMP" != "$1" ]; then
WORACLE_PATH="$WORACLE_PATH_TMP"
fi
fi
if [ "X" = "X$WORACLE_LIB_PATH" ]; then
WORACLE_LIB_PATH_TMP=`echo "$1"|sed 's/.*--with-oracle-lib=//'`
if [ "$WORACLE_LIB_PATH_TMP" != "$1" ]; then
WORACLE_LIB_PATH="$WORACLE_LIB_PATH_TMP"
fi
fi
shift
done
fi
echo
echo "Starting hydra auto configuration ..."
rm -f Makefile.in
SYSS=`uname -s 2> /dev/null`
SYSO=`uname -o 2> /dev/null`
SYSM=`uname -m 2> /dev/null`
if [ "$SYSS" = "Linux" -o "$SYSS" = "OpenBSD" -o "$SYSS" = "FreeBSD" -o "$SYSS" = "NetBSD" -o "$SYSS" = "Darwin" ]; then
SF=`uname -m | grep 64`
if [ `uname -m` = "s390x" ]; then
SF=64
fi
if [ "x$SF" = "x" ]; then
SIXFOUR=""
echo Detected 32 Bit $SYSS OS
else
SIXFOUR=64
echo Detected 64 Bit $SYSS OS
fi
fi
# On macOS /usr/include only exists if one has installed the Command Line Tools package.
# If this is an Xcode-only system we need to look inside the SDK for headers.
SDK_PATH=""
if [ "$SYSS" = "Darwin" -a ! -d "/usr/include" ]; then
SDK_PATH=`xcrun --show-sdk-path`
fi
LIBDIRS=`cat /etc/ld.so.conf /etc/ld.so.conf.d/* 2> /dev/null | grep -v '^#' | sort | uniq`
if [ "$SIXFOUR" = "64" ]; then
LIBDIRS="$LIBDIRS /lib64 /usr/lib64 /usr/local/lib64 /opt/local/lib64"
fi
if [ -d "/Library/Developer/CommandLineTools/usr/lib" ]; then
LIBDIRS="$LIBDIRS /Library/Developer/CommandLineTools/usr/lib /Library/Developer/CommandLineTools/lib"
fi
LIBDIRS="$LIBDIRS /lib /usr/lib /usr/local/lib /opt/local/lib /mingw64/lib /mingw64/bin"
INCDIRS="$SDK_PATH/usr/include /usr/local/include /opt/include /opt/local/include /mingw64/include"
if [ -n "$PREFIX" ]; then
if [ -d "$PREFIX/lib" ]; then
LIBDIRS="$LIBDIRS $PREFIX/lib"
fi
if [ -d "$PREFIX/include" ]; then
INCDIRS="$INCDIRS $PREFIX/include"
fi
fi
STRIP="strip"
echo
echo "Checking for zlib (libz/zlib.h) ..."
for i in $INCDIRS; do
if [ -f "$i/zlib.h" ]; then
HAVE_ZLIB="y"
fi
done
if [ -n "$HAVE_ZLIB" ]; then
echo " ... found"
else
echo " ... zlib not found, gzip support disabled"
fi
echo "Checking for openssl (libssl/libcrypto/ssl.h/sha.h) ..."
if [ "X" != "X$DEBUG" ]; then
echo DEBUG: SSL_LIB=$LIBDIRS `ls -d /*ssl /usr/*ssl /opt/*ssl /usr/local/*ssl /opt/local/*ssl /*ssl/lib /usr/*ssl/lib /opt/*ssl/lib /usr/local/*ssl/lib /opt/local/*ssl/lib 2> /dev/null`
echo DEBUG: SSL_INC=$INCDIRS `ls -d /*ssl/include /opt/*ssl/include /usr/*ssl/include /usr/local/*ssl/include 2> /dev/null`
fi
if [ "X" != "X$WSSL_LIB_PATH" ]; then
SSL_PATH="$i"
CRYPTO_PATH="$i"
else
for i in $LIBDIRS \
/*ssl /usr/*ssl /opt/*ssl /usr/local/*ssl /opt/local/*ssl \
/*ssl/lib /usr/*ssl/lib /opt/*ssl/lib /usr/local/*ssl/lib /opt/local/*ssl/lib
do
if [ "X" = "X$SSL_PATH" ]; then
if [ -f "$i/libssl.so" -o -f "$i/libssl.dylib" -o -f "$i/libssl.a" ]; then
SSL_PATH="$i"
fi
fi
if [ "X" = "X$SSL_PATH" ]; then
TMP_LIB=`/bin/ls $i/libssl.so* /bin/cygssl*.dll 2> /dev/null | grep ssl`
if [ -n "$TMP_LIB" ]; then
SSL_PATH="$i"
fi
fi
if [ "X" = "X$CRYPTO_PATH" ]; then
if [ -f "$i/libcrypto.so" -o -f "$i/libcrypto.dylib" -o -f "$i/libcrypto.a" ]; then
CRYPTO_PATH="$i"
fi
fi
if [ "X" = "X$CRYPTO_PATH" ]; then
TMP_LIB=`/bin/ls $i/libcrypto.so* /bin/cygcrypto*.dll 2> /dev/null | grep crypto`
if [ -n "$TMP_LIB" ]; then
CRYPTO_PATH="$i"
fi
fi
done
fi
SSLNEW=""
if [ "X" = "X$SSL_PATH" ]; then
SSL_PATH="$i"
SSLNEW=`grep SHA256_CTX $i/openssl/sha.h 2> /dev/null`
else
for i in $INCDIRS /*ssl/include /opt/*ssl/include /usr/*ssl/include /usr/local/*ssl/include
do
if [ "X" = "X$SSL_IPATH" ]; then
if [ -f "$i/openssl/ssl.h" ]; then
SSL_IPATH="$i"
SSLNEW=`grep SHA256_CTX $i/openssl/sha.h 2> /dev/null`
fi
fi
done
fi
if [ "X" != "X$DEBUG" ]; then
echo DEBUG: SSL_PATH=$SSL_PATH/libssl
echo DEBUG: CRYPTO_PATH=$CRYPTO_PATH/libcrypto
echo DEBUG: SSL_INC=$SSL_IPATH/openssl/ssl.h
fi
if [ "X" = "X$SSL_PATH" ]; then
SSL_IPATH=""
CRYPTO_PATH=""
fi
if [ "X" = "X$SSL_IPATH" ]; then
SSL_PATH=""
CRYPTO_PATH=""
fi
if [ -n "$SSL_PATH" -a "X" = "X$SSLNEW" ]; then
echo " ... found but OLD"
echo "NOTE: your OpenSSL package is outdated, update it!"
fi
if [ -n "$SSL_PATH" -a '!' "X" = "X$SSLNEW" ]; then
echo " ... found"
fi
if [ "X" = "X$SSL_PATH" ]; then
echo " ... NOT found, SSL support disabled"
echo "Get it from http://www.openssl.org"
fi
if [ "$SSL_IPATH" = "/usr/include" ]; then
SSL_IPATH=""
fi
echo "Checking for gcrypt (libgcrypt/gpg-error.h) ..."
for i in $LIBDIRS ; do
if [ -f "$i/libgcrypt.so" -o -f "$i/libgcrypt.dylib" -o -f "$i/libgcrypt.a" -o -f "$i/libgcrypt.dll.a" -o -f "$i/libgcrypt.la" ]; then
HAVE_GCRYPT="y"
fi
done
for i in $INCDIRS ; do
if [ "X" = "X$GPGERROR_IPATH" ]; then
TMP_PATH=`/bin/ls $i/$SYSM*/gpg-error.h 2> /dev/null`
if [ -n "$TMP_PATH" ]; then
GPGERROR_IPATH="$i"
else
if [ -f "$i/gpg-error.h" ]; then
GPGERROR_IPATH="$i"
fi
fi
fi
done
if [ -n "$HAVE_GCRYPT" -a "X" != "X$GPGERROR_IPATH" ]; then
echo " ... found"
else
echo " ... gcrypt not found, radmin2 module disabled"
HAVE_GCRYPT=""
fi
echo "Checking for idn (libidn) ..."
for i in $LIBDIRS ; do
if [ "X" = "X$IDN_PATH" ]; then
if [ -f "$i/libidn.so" -o -f "$i/libidn.dylib" -o -f "$i/libidn.a" -o -f "$i/libidn.dll.a" -o -f "$i/libidn.la" ]; then
IDN_PATH="$i"
fi
fi
if [ "X" = "X$IDN_PATH" ]; then
TMP_LIB=`/bin/ls $i/libidn.so* /bin/libidn*.dll 2> /dev/null | grep ssl`
if [ -n "$TMP_LIB" ]; then
IDN_PATH="$i"
fi
fi
done
for i in $INCDIRS ; do
if [ "X" != "X$IDN_PATH" ]; then
if [ -f "$i/stringprep.h" ]; then
IDN_IPATH="$i"
fi
fi
if [ "X" != "X$IDN_PATH" ]; then
if [ -f "$i/pr29.h" ]; then
PR29_IPATH="$i"
fi
fi
done
if [ "X" != "X$DEBUG" ]; then
echo DEBUG: IDN_PATH=$IDN_PATH/libidn
echo DEBUG: IDN_IPATH=$IDN_IPATH/stringprep.h
echo DEBUG: PR29_IPATH=$PR29_IPATH/pr29.h
fi
if [ -n "$IDN_PATH" -a -n "$IDN_IPATH" ]; then
echo " ... found"
fi
#pr29 is optional
if [ "X" = "X$IDN_PATH" -o "X" = "X$IDN_IPATH" ]; then
echo " ... NOT found, unicode logins and passwords will not be supported"
IDN_PATH=""
IDN_IPATH=""
PR29_IPATH=""
fi
echo "Checking for curses (libcurses/term.h) ..."
for i in $LIBDIRS; do
if [ "X" = "X$CURSES_PATH" ]; then
if [ -f "$i/libcurses.so" -o -f "$i/libcurses.dylib" -o -f "$i/libcurses.a" ]; then
CURSES_PATH="$i"
fi
fi
if [ "X" = "X$CURSES_PATH" ]; then
TMP_LIB=`/bin/ls $i/libcurses.so.* 2> /dev/null | grep curses.`
if [ -n "$TMP_LIB" ]; then
CURSES_PATH="$i"
fi
fi
if [ "X" = "X$CURSES_PATH" ]; then
TMP_LIB=`/bin/ls $i/libcurses.dll* 2> /dev/null | grep curses.`
if [ -n "$TMP_LIB" ]; then
CURSES_PATH="$i"
fi
fi
done
for i in $INCDIRS ; do
if [ "X" != "X$CURSES_PATH" ]; then
if [ -f "$i/term.h" ]; then
CURSES_IPATH="$i"
fi
if [ -f "$i/ncurses/term.h" ]; then
CURSES_IPATH="$i/ncurses"
fi
fi
done
if [ "X" != "X$DEBUG" ]; then
echo DEBUG: CURSES_PATH=$CURSES_PATH/libcurses
echo DEBUG: CURSES_IPATH=$CURSES_IPATH/term.h
fi
if [ -n "$CURSES_PATH" -a -n "$CURSES_IPATH" ]; then
echo " ... found, color output enabled"
fi
if [ "X" = "X$CURSES_PATH" -o "X" = "X$CURSES_IPATH" ]; then
echo " ... NOT found, color output disabled"
CURSES_PATH=""
CURSES_IPATH=""
fi
echo "Checking for pcre2 (libpcre/pcre.h) ..."
for i in $LIBDIRS ; do
if [ "X" = "X$PCRE_PATH" ]; then
if [ -f "$i/libpcre2-8.so" -o -f "$i/libpcre2-8.dylib" -o -f "$i/libpcre2-8.a" ]; then
PCRE_PATH="$i"
fi
fi
if [ "X" = "X$PCRE_PATH" ]; then
TMP_LIB=`/bin/ls $i/libpcre2*.so* 2> /dev/null | grep libpcre.`
if [ -n "$TMP_LIB" ]; then
PCRE_PATH="$i"
fi
fi
if [ "X" = "X$PCRE_PATH" ]; then
TMP_LIB=`/bin/ls $i/libpcre2*.dll* 2> /dev/null | grep libpcre.`
if [ -n "$TMP_LIB" ]; then
PCRE_PATH="$i"
fi
fi
done
for i in $INCDIRS ; do
if [ "X" != "X$PCRE_PATH" ]; then
if [ -f "$i/pcre2.h" ]; then
PCRE_IPATH="$i"
fi
fi
done
if [ "X" != "X$DEBUG" ]; then
echo DEBUG: PCRE_PATH=$PCRE_PATH/libpcre
echo DEBUG: PCRE_IPATH=$PCRE_IPATH/pcre2.h
fi
if [ -n "$PCRE_PATH" -a -n "$PCRE_IPATH" ]; then
echo " ... found"
fi
if [ "X" = "X$PCRE_PATH" -o "X" = "X$PCRE_IPATH" ]; then
echo " ... NOT found, server response checks will be less reliable"
PCRE_PATH=""
PCRE_IPATH=""
fi
echo "Checking for Postgres (libpq/libpq-fe.h) ..."
#if [ "$SYSO" = "Cygwin" ]; then
# echo " ... DISABLED - postgres is buggy in Cygwin at the moment"
# POSTGRES_PATH=""
# POSTGRES_IPATH=""
#else
for i in $LIBDIRS ; do
if [ "X" = "X$POSTGRES_PATH" ]; then
if [ -f "$i/libpq.so" -o -f "$i/libpq.dylib" -o -f "$i/libpq.a" ]; then
POSTGRES_PATH="$i"
fi
fi
if [ "X" = "X$POSTGRES_PATH" ]; then
TMP_LIB=`/bin/ls $i/libpq.so* 2> /dev/null | grep pq`
if [ -n "$TMP_LIB" ]; then
POSTGRES_PATH="$i"
fi
fi
if [ "X" = "X$POSTGRES_PATH" ]; then
TMP_LIB=`/bin/ls $i/libpq.dll* 2> /dev/null | grep pq`
if [ -n "$TMP_LIB" ]; then
POSTGRES_PATH="$i"
fi
fi
done
POSTGRES_IPATH=
for i in $INCDIRS \
/opt/p*sql*/include /usr/*p*sql*/include /usr/local/*psql*/include /mingw64/include
do
if [ "X" = "X$POSTGRES_IPATH" ]; then
if [ -f "$i/libpq-fe.h" ]; then
POSTGRES_IPATH="$i"
fi
if [ -f "$i/pgsql/libpq-fe.h" ]; then
POSTGRES_IPATH="$i/pgsql"
fi
if [ -f "$i/postgresql/libpq-fe.h" ]; then
POSTGRES_IPATH="$i/postgresql"
fi
fi
done
if [ "X" != "X$DEBUG" ]; then
echo DEBUG: POSTGRES_PATH=$POSTGRES_PATH/libpq
echo DEBUG: POSTGRES_IPATH=$POSTGRES_IPATH/libpq-fe.h
fi
if [ -n "$POSTGRES_PATH" -a -n "$POSTGRES_IPATH" ]; then
echo " ... found"
fi
if [ "X" = "X$POSTGRES_PATH" -o "X" = "X$POSTGRES_IPATH" ]; then
echo " ... NOT found, module postgres disabled"
POSTGRES_PATH=""
POSTGRES_IPATH=""
fi
#fi
echo "Checking for SVN (libsvn_client-1/libapr-1/libaprutil-1) ..."
for i in $LIBDIRS ; do
if [ "X" = "X$SVN_PATH" ]; then
if [ -f "$i/libsvn_client-1.so" ]; then
SVN_PATH="$i"
fi
fi
if [ "X" = "X$APR_PATH" ]; then
if [ -f "$i/libapr-1.so" -a -f "$i/libaprutil-1.so" ]; then
APR_PATH="$i"
fi
fi
if [ "X" = "X$SVN_PATH" ]; then
if [ -f "$i/libsvn_client-1.dll.a" ]; then
SVN_PATH="$i"
fi
fi
if [ "X" = "X$APR_PATH" ]; then
if [ -f "$i/libapr-1.dll.a" -a -f "$i/libaprutil-1.dll.a" ]; then
APR_PATH="$i"
fi
fi
if [ "X" = "X$SVN_PATH" ]; then
if [ -f "$i/libsvn_client-1.dylib" ]; then
SVN_PATH="$i"
fi
fi
if [ "X" = "X$APR_PATH" ]; then
if [ -f "$i/libapr-1.dylib" -a -f "$i/libaprutil-1.dylib" ]; then
APR_PATH="$i"
fi
fi
if [ "X" = "X$SVN_PATH" ]; then
if [ -f "$i/libsvn_client-1.a" ]; then
SVN_PATH="$i"
fi
fi
if [ "X" = "X$APR_PATH" ]; then
if [ -f "$i/libapr-1.a" -a -f "$i/libaprutil-1.a" ]; then
APR_PATH="$i"
fi
fi
if [ "X" = "X$SVN_PATH" ]; then
if [ -f "$i/libsvn_client-1.0.dylib" ]; then
SVN_PATH="$i"
fi
fi
if [ "X" = "X$APR_PATH" ]; then
if [ -f "$i/libapr-1.0.dylib" -a -f "$i/libaprutil-1.0.dylib" ]; then
APR_PATH="$i"
fi
fi
if [ "X" = "X$SVN_PATH" ]; then
TMP_LIB1=`/bin/ls $i/libsvn_client*.so* 2> /dev/null | grep libsvn_client.`
if [ -n "$TMP_LIB1" ]; then
SVN_PATH="$i"
fi
fi
if [ "X" = "X$APR_PATH" ]; then
TMP_LIB2=`/bin/ls $i/libapr-1*.so* 2> /dev/null | grep libsvn_client.`
TMP_LIB3=`/bin/ls $i/libaprutil-1*.so* 2> /dev/null | grep libsvn_client.`
if [ -n "$TMP_LIB2" -a -n "$TMP_LIB3" ]; then
APR_PATH="$i"
fi
fi
if [ "X" = "X$SVN_PATH" ]; then
TMP_LIB1=`/bin/ls $i/libsvn_client*.dll* 2> /dev/null | grep libsvn_client.`
if [ -n "$TMP_LIB1" ]; then
SVN_PATH="$i"
fi
fi
if [ "X" = "X$APR_PATH" ]; then
TMP_LIB2=`/bin/ls $i/libapr-1*.dll* 2> /dev/null | grep libsvn_client.`
TMP_LIB3=`/bin/ls $i/libaprutil-1*.dll* 2> /dev/null | grep libsvn_client.`
if [ -n "$TMP_LIB2" -a -n "$TMP_LIB3" ]; then
APR_PATH="$i"
fi
fi
done
for i in $INCDIRS ; do
if [ "X" = "X$SVN_IPATH" ]; then
if [ -d "$i/subversion-1" ]; then
SVN_IPATH="$i/subversion-1"
fi
if [ -d "$i/svn" ]; then
SVN_IPATH="$i/svn"
fi
fi
if [ "X" = "X$APR_IPATH" ]; then
if [ -d "$i/apr-1.0" ]; then
APR_IPATH="$i/apr-1.0"
fi
if [ -d "$i/apr-1" ]; then
APR_IPATH="$i/apr-1"
fi
if [ -d "$i/apr" ]; then
APR_IPATH="$i/apr"
fi
fi
done
SYS_PARAM=""
if [ -f "$SDK_PATH/usr/include/sys/param.h" ]; then
SYS_PARAM=-DHAVE_SYS_PARAM_H
fi
if [ "X" != "X$DEBUG" ]; then
echo DEBUG: SVN_PATH=$SVN_PATH/libsvn_client-1
echo DEBUG: APR_PATH=$APR_PATH/libapr
echo DEBUG: SVN_IPATH=$APR_IPATH/
echo DEBUG: APR_IPATH=$APR_IPATH/
fi
if [ "X" = "X$SVN_PATH" -o "X" = "X$SVN_IPATH" -o "X" = "X$APR_IPATH" ]; then
SVN_PATH=""
SVN_IPATH=""
APR_IPATH=""
fi
if [ "$SVN_IPATH" = "/usr/include" ]; then
SVN_IPATH=""
fi
if [ "$APR_IPATH" = "/usr/include" ]; then
APR_IPATH=""
fi
if [ -n "$SVN_PATH" -a -n "$APR_PATH" ]; then
echo " ... found"
fi
if [ "X" = "X$SVN_PATH" -o "X" = "X$APR_PATH" ]; then
echo " ... NOT found, module svn disabled"
fi
echo "Checking for firebird (libfbclient) ..."
for i in $LIBDIRS ; do
if [ "X" = "X$FIREBIRD_PATH" ]; then
if [ -f "$i/libfbclient.so" -o -f "$i/libfbclient.dylib" -o -f "$i/libfbclient.a" ]; then
FIREBIRD_PATH="$i"
fi
fi
if [ "X" = "X$FIREBIRD_PATH" ]; then
TMP_LIB=`/bin/ls $i/libfbclient.so.* 2> /dev/null | grep libfbclient.`
if [ -n "$TMP_LIB" ]; then
FIREBIRD_PATH="$i"
fi
fi
if [ "X" = "X$FIREBIRD_PATH" ]; then
TMP_LIB=`/bin/ls $i/libfbclient.dll* 2> /dev/null | grep libfbclient.`
if [ -n "$TMP_LIB" ]; then
FIREBIRD_PATH="$i"
fi
fi
done
for i in $INCDIRS ; do
if [ "X" != "X$FIREBIRD_PATH" ]; then
if [ -f "$i/ibase.h" ]; then
FIREBIRD_IPATH="$i"
fi
if [ -f "$i/firebird/ibase.h" ]; then
FIREBIRD_IPATH="$i/firebird"
fi
fi
done
if [ "X" != "X$DEBUG" ]; then
echo DEBUG: FIREBIRD_PATH=$FIREBIRD_PATH/libfbclient
echo DEBUG: FIREBIRD_IPATH=$FIREBIRD_IPATH/ibase.h
fi
if [ -n "$FIREBIRD_PATH" -a -n "$FIREBIRD_IPATH" ]; then
echo " ... found"
fi
if [ "X" = "X$FIREBIRD_PATH" -o "X" = "X$FIREBIRD_IPATH" ]; then
echo " ... NOT found, module firebird disabled"
FIREBIRD_PATH=""
FIREBIRD_IPATH=""
fi
echo "Checking for MYSQL client (libmysqlclient/math.h) ..."
for i in $LIBDIRS ; do
if [ "X" = "X$MYSQL_PATH" ]; then
if [ -f "$i/libmysqlclient.so" -o -f "$i/libmysqlclient.dylib" -o -f "$i/libmysqlclient.a" ]; then
MYSQL_PATH="$i"
fi
fi
if [ "X" = "X$MYSQL_PATH" ]; then
TMP_LIB=`/bin/ls $i/libmysqlclient.so.* 2> /dev/null | grep libmysqlclient.`
if [ -n "$TMP_LIB" ]; then
MYSQL_PATH="$i"
fi
fi
if [ "X" = "X$MYSQL_PATH" ]; then
TMP_LIB=`/bin/ls $i/libmysqlclient.dll* 2> /dev/null | grep libmysqlclient.`
if [ -n "$TMP_LIB" ]; then
MYSQL_PATH="$i"
fi
fi
done
MYSQLINSUBDIR=""
for i in $INCDIRS ; do
if [ "X" != "X$MYSQL_PATH" ]; then
if [ -f "$i/mysql/mysql.h" ]; then
MYSQL_IPATH="$i/mysql"
MYSQLINSUBDIR="mysql/"
fi
if [ -f "$i/mysql.h" ]; then
MYSQL_IPATH="$i"
fi
fi
done
if [ "X" != "X$DEBUG" ]; then
echo DEBUG: MYSQL_PATH=$MYSQL_PATH/libmysqlclient
echo DEBUG: MYSQL_IPATH=$MYSQL_IPATH/mysql.h
fi
MATH=""
if [ -f "$SDK_PATH/usr/include/math.h" ]; then
MATH="-DHAVE_MATH_H"
if [ -n "$MYSQL_PATH" -a -n "$MYSQL_IPATH" -a -n "$MATH" ]; then
echo " ... found"
else
echo " ... NOT found, module Mysql will not support version > 4.x"
MYSQL_PATH=""
MYSQL_IPATH=""
fi
else
echo " ... math.h not found, module Mysql disabled"
fi
echo "Checking for AFP (libafpclient) ..."
for i in $LIBDIRS ; do
if [ "X" = "X$AFP_PATH" ]; then
if [ -f "$i/libafpclient.so" -o -f "$i/libafpclient.so" -o -f "$i/libafpclient.a" ]; then
AFP_PATH="$i"
fi
fi
if [ "X" = "X$AFP_PATH" ]; then
TMP_LIB=`/bin/ls $i/libafpclient.so.* 2> /dev/null | grep libafpclient.`
if [ -n "$TMP_LIB" ]; then
AFP_PATH="$i"
fi
fi
if [ "X" = "X$AFP_PATH" ]; then
TMP_LIB=`/bin/ls $i/libafpclient.dll* 2> /dev/null | grep libafpclient.`
if [ -n "$TMP_LIB" ]; then
AFP_PATH="$i"
fi
fi
done
for i in $INCDIRS ; do
if [ "X" != "X$AFP_PATH" ]; then
if [ -f "$i/afpfs-ng/afp.h" ]; then
AFP_IPATH="$i/afpfs-ng"
fi
fi
done
if [ "X" != "X$DEBUG" ]; then
echo DEBUG: AFP_PATH=$AFP_PATH/libafpclient
echo DEBUG: AFP_IPATH=$AFP_IPATH/afp.h
fi
if [ -n "$AFP_PATH" -a -n "$AFP_IPATH" ]; then
echo " ... found"
fi
if [ "X" = "X$AFP_PATH" -o "X" = "X$AFP_IPATH" ]; then
echo " ... NOT found, module Apple Filing Protocol disabled - Apple sucks anyway"
AFP_PATH=""
AFP_IPATH=""
fi
echo "Checking for NCP (libncp/nwcalls.h) ..."
for i in $LIBDIRS ; do
if [ "X" = "X$NCP_PATH" ]; then
if [ -f "$i/libncp.so" -o -f "$i/libncp.dylib" -o -f "$i/libncp.a" ]; then
NCP_PATH="$i"
fi
fi
if [ "X" = "X$NCP_PATH" ]; then
TMP_LIB=`/bin/ls $i/libncp.so.* 2> /dev/null | grep ncp.`
if [ -n "$TMP_LIB" ]; then
NCP_PATH="$i"
fi
fi
if [ "X" = "X$NCP_PATH" ]; then
TMP_LIB=`/bin/ls $i/libncp.dll* 2> /dev/null | grep ncp.`
if [ -n "$TMP_LIB" ]; then
NCP_PATH="$i"
fi
fi
done
for i in $INCDIRS ; do
if [ "X" != "X$NCP_PATH" ]; then
if [ -f "$i/ncp/nwcalls.h" ]; then
NCP_IPATH="$i"
fi
fi
done
if [ "X" != "X$DEBUG" ]; then
echo DEBUG: NCP_PATH=$NCP_PATH/libncp
echo DEBUG: NCP_IPATH=$NCP_IPATH/ncp/nwcalls.h
fi
if [ -n "$NCP_PATH" -a -n "$NCP_IPATH" ]; then
echo " ... found"
fi
if [ "X" = "X$NCP_PATH" -o "X" = "X$NCP_IPATH" ]; then
echo " ... NOT found, module NCP disabled"
NCP_PATH=""
NCP_IPATH=""
fi
echo "Checking for SAP/R3 (librfc/saprfc.h) ..."
for i in $LIBDIRS ; do
if [ "X" = "X$SAPR3_PATH" ]; then
if [ -f "$i/librfc.a" -o -f "$i/librfc.dylib" -o "$i/librfc32.dll" ]; then
SAPR3_PATH="$i"
fi
fi
if [ "X" = "X$SAPR3_PATH" ]; then
TMP_LIB=`/bin/ls $i/librfc.* $i/librfc32.* 2> /dev/null | grep librfc`
if [ -n "$TMP_LIB" ]; then
SAPR3_PATH="$i"
fi
fi
done
for i in $INCDIRS ; do
if [ "X" = "X$SAPR3_IPATH" ]; then
if [ -f "$i/saprfc.h" ]; then
SAPR3_IPATH="$i"
fi
fi
done
if [ "X" != "X$DEBUG" ]; then
echo DEBUG: SAPR3_PATH=$SAPR3_PATH/librfc
echo DEBUG: SAPR3_IPATH=$SAPR3_IPATH/saprfc.h
fi
if [ "X" = "X$SAPR3_PATH" ]; then
SAPR3_IPATH=""
fi
if [ "X" = "X$SAPR3_IPATH" ]; then
SAPR3_PATH=""
fi
if [ -n "$SAPR3_PATH" ]; then
echo " ... found"
fi
if [ "X" = "X$SAPR3_PATH" ]; then
echo " ... NOT found, module sapr3 disabled"
echo "Get it from http://www.sap.com/solutions/netweaver/linux/eval/index.asp"
fi
if [ "$SAPR3_IPATH" = "/usr/include" ]; then
SAPR3_IPATH=""
fi
echo "Checking for libssh (libssh/libssh.h) ..."
for i in $LIBDIRS ; do
if [ "X" = "X$SSH_PATH" ]; then
if [ -f "$i/libssh.so" -o -f "$i/libssh.dylib" -o -f "$i/libssh.a" ]; then
SSH_PATH="$i"
fi
fi
if [ "X" = "X$SSH_PATH" ]; then
TMP_LIB=`/bin/ls $i/libssh.so* 2> /dev/null | grep libssh.`
if [ -n "$TMP_LIB" ]; then
SSH_PATH="$i"
fi
fi
if [ "X" = "X$SSH_PATH" ]; then
TMP_LIB=`/bin/ls $i/libssh.dll* 2> /dev/null | grep libssh.`
if [ -n "$TMP_LIB" ]; then
SSH_PATH="$i"
fi
fi
done
for i in $INCDIRS ; do
if [ "X" = "X$SSH_IPATH" ]; then
if [ -f "$i/libssh/libssh.h" ]; then
SSH_IPATH="$i"
fi
fi
done
if [ "X" != "X$DEBUG" ]; then
echo DEBUG: SSH_PATH=$SSH_PATH/libssh
echo DEBUG: SSH_IPATH=$SSH_IPATH/libssh/libssh.h
fi
if [ "X" = "X$SSH_PATH" ]; then
SSH_IPATH=""
fi
if [ "X" = "X$SSH_IPATH" ]; then
SSH_PATH=""
fi
if [ -n "$SSH_PATH" ]; then
echo " ... found"
fi
if [ "X" = "X$SSH_PATH" ]; then
echo " ... NOT found, module ssh disabled"
echo 'Get it from http://www.libssh.org'
fi
if [ "$SSH_IPATH" = "/usr/include" ]; then
SSH_IPATH=""
fi
echo "Checking for Oracle (libocci/libclntsh/oci.h/libaio/liboci) ..."
#assume if we find oci.h other headers should also be in that dir
#for libs we will test the 2
if [ "X" != "X$WORACLE_PATH" ]; then
INCDIRS="$INCDIRS $WORACLE_PATH"
fi
if [ "X" != "X$WORACLE_LIB_PATH" ]; then
LIBDIRS="$LIBDIRS $WORACLE_LIB_PATH"
fi
if [ "X" != "X$DEBUG" ]; then
echo DEBUG: ORACLE_LIB=$LIBDIRS
echo DEBUG: ORACLE_INC=$INCDIRS
fi
for i in $LIBDIRS ; do
if [ "X" = "X$ORACLE_PATH" ]; then
if [ -f "$i/libocci.so" -a -f "$i/libclntsh.so" ]; then
ORACLE_PATH="$i"
fi
fi
if [ "X" = "X$ORACLE_PATH" ]; then
if [ -f "$i/libocci.dylib" -a -f "$i/libclntsh.dylib" ]; then
ORACLE_PATH="$i"
fi
fi
if [ "X" = "X$ORACLE_PATH" ]; then
if [ -f "$i/libocci.a" -a -f "$i/libclntsh.a" ]; then
ORACLE_PATH="$i"
fi
fi
if [ "X" = "X$ORACLE_PATH" ]; then
if [ -f "$i/liboci.a" -a -f "$i/oci.dll" ]; then
ORACLE_PATH="$i"
fi
fi
if [ "X" = "X$ORACLE_PATH" ]; then
TMP_LIB=`/bin/ls $i/libocci.so.* 2> /dev/null | grep occi.`
if [ -n "$TMP_LIB" ]; then
ORACLE_PATH="$i"
fi
if [ "X" != "X$ORACLE_PATH" ]; then
TMP_LIB=`/bin/ls $i/libclntsh.so.* 2> /dev/null | grep clntsh.`
if [ -z "$TMP_LIB" ]; then
ORACLE_PATH=""
fi
fi
fi
if [ "X" = "X$ORACLE_PATH" ]; then
TMP_LIB=`/bin/ls $i/oci.dll* 2> /dev/null | grep occi.`
if [ -n "$TMP_LIB" ]; then
ORACLE_PATH="$i"
fi
fi
done
if [ "X" != "X$DEBUG" ]; then
echo DEBUG: ORACLE_PATH=$ORACLE_PATH/libocci
fi
#check for Kernel Asynchronous I/O (AIO) lib support, no need on Cygwin
if [ "X" != "X$ORACLE_PATH" -a "$SYSO" != "Cygwin" ]; then
LIBAIO=""
for i in $LIBDIRS ; do
if [ "X" = "X$LIBAIO" ]; then
if [ -f "$i/libaio.so" -o -f "$i/libaio.dylib" -o -f "$i/libaio.a" ]; then
LIBAIO="$i"
fi
fi
if [ "X" = "X$LIBAIO" ]; then
TMP_LIB=`/bin/ls $i/libaio.so.* 2> /dev/null | grep aio.`
if [ -n "$TMP_LIB" ]; then
LIBAIO="$i"
fi
TMP_LIB=`/bin/ls $i/libaio.dll* 2> /dev/null | grep aio.`
if [ -n "$TMP_LIB" ]; then
LIBAIO="$i"
fi
fi
done
if [ "X" = "X$LIBAIO" ]; then
ORACLE_PATH=""
fi
fi
if [ "X" != "X$DEBUG" ]; then
echo DEBUG: ORACLE_PATH=$ORACLE_PATH/libaio
fi
for i in $INCDIRS ; do
if [ -f "$i/oci.h" ]; then
ORACLE_IPATH="$i"
fi
done
if [ "X" != "X$DEBUG" ]; then
echo DEBUG: ORACLE_IPATH=$ORACLE_IPATH/oci.h
fi
if [ -n "$ORACLE_PATH" -a -n "$ORACLE_IPATH" ]; then
echo " ... found"
fi
if [ "X" = "X$ORACLE_PATH" -o "X" = "X$ORACLE_IPATH" ]; then
echo " ... NOT found, module Oracle disabled"
echo "Get basic and sdk package from https://www.oracle.com/database/technologies/instant-client/downloads.html"
ORACLE_PATH=""
ORACLE_IPATH=""
fi
echo "Checking for Memcached (libmemcached/memcached.h) ..."
for i in $LIBDIRS ; do
if [ "X" = "X$MCACHED_PATH" ]; then
if [ -f "$i/libmemcached.so" -o -f "$i/libmemcached.dylib" -o -f "$i/libmemcached.a" ]; then
MCACHED_PATH="$i"
fi
fi
if [ "X" = "X$MCACHED_PATH" ]; then
TMP_LIB=`/bin/ls $i/libmemcached.so* 2> /dev/null | grep memcached`
if [ -n "$TMP_LIB" ]; then
MCACHED_PATH="$i"
fi
fi
if [ "X" = "X$MCACHED_PATH" ]; then
TMP_LIB=`/bin/ls $i/libmemcached.dll* 2> /dev/null | grep memcached`
if [ -n "$TMP_LIB" ]; then
MCACHED_PATH="$i"
fi
fi
done
MCACHED_IPATH=
for i in $INCDIRS ; do
if [ "X" = "X$MCACHED_IPATH" ]; then
if [ -f "$i/memcached.h" ]; then
MCACHED_IPATH="$i"