5284
echo "$as_me:$LINENO: checking for va_copy" >&5
5285
echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
5286
if test "${ac_cv_HAVE_VA_COPY+set}" = set; then
5287
echo $ECHO_N "(cached) $ECHO_C" >&6
5290
cat >conftest.$ac_ext <<_ACEOF
5293
cat confdefs.h >>conftest.$ac_ext
5294
cat >>conftest.$ac_ext <<_ACEOF
5295
/* end confdefs.h. */
5306
rm -f conftest.$ac_objext conftest$ac_exeext
5307
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5308
(eval $ac_link) 2>conftest.er1
5310
grep -v '^ *+' conftest.er1 >conftest.err
5312
cat conftest.err >&5
5313
echo "$as_me:$LINENO: \$? = $ac_status" >&5
5314
(exit $ac_status); } &&
5315
{ ac_try='test -z "$ac_c_werror_flag"
5316
|| test ! -s conftest.err'
5317
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5320
echo "$as_me:$LINENO: \$? = $ac_status" >&5
5321
(exit $ac_status); }; } &&
5322
{ ac_try='test -s conftest$ac_exeext'
5323
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5326
echo "$as_me:$LINENO: \$? = $ac_status" >&5
5327
(exit $ac_status); }; }; then
5328
ac_cv_HAVE_VA_COPY=yes
5330
echo "$as_me: failed program was:" >&5
5331
sed 's/^/| /' conftest.$ac_ext >&5
5333
ac_cv_HAVE_VA_COPY=no
5335
rm -f conftest.err conftest.$ac_objext \
5336
conftest$ac_exeext conftest.$ac_ext
5338
echo "$as_me:$LINENO: result: $ac_cv_HAVE_VA_COPY" >&5
5339
echo "${ECHO_T}$ac_cv_HAVE_VA_COPY" >&6
5340
if test x"$ac_cv_HAVE_VA_COPY" = x"yes"; then
5342
cat >>confdefs.h <<\_ACEOF
5343
#define HAVE_VA_COPY 1
5347
echo "$as_me:$LINENO: checking for __va_copy" >&5
5348
echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
5349
if test "${ac_cv_HAVE___VA_COPY+set}" = set; then
5350
echo $ECHO_N "(cached) $ECHO_C" >&6
5353
cat >conftest.$ac_ext <<_ACEOF
5356
cat confdefs.h >>conftest.$ac_ext
5357
cat >>conftest.$ac_ext <<_ACEOF
5358
/* end confdefs.h. */
5369
rm -f conftest.$ac_objext conftest$ac_exeext
5370
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5371
(eval $ac_link) 2>conftest.er1
5373
grep -v '^ *+' conftest.er1 >conftest.err
5375
cat conftest.err >&5
5376
echo "$as_me:$LINENO: \$? = $ac_status" >&5
5377
(exit $ac_status); } &&
5378
{ ac_try='test -z "$ac_c_werror_flag"
5379
|| test ! -s conftest.err'
5380
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5383
echo "$as_me:$LINENO: \$? = $ac_status" >&5
5384
(exit $ac_status); }; } &&
5385
{ ac_try='test -s conftest$ac_exeext'
5386
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5389
echo "$as_me:$LINENO: \$? = $ac_status" >&5
5390
(exit $ac_status); }; }; then
5391
ac_cv_HAVE___VA_COPY=yes
5393
echo "$as_me: failed program was:" >&5
5394
sed 's/^/| /' conftest.$ac_ext >&5
5396
ac_cv_HAVE___VA_COPY=no
5398
rm -f conftest.err conftest.$ac_objext \
5399
conftest$ac_exeext conftest.$ac_ext
5401
echo "$as_me:$LINENO: result: $ac_cv_HAVE___VA_COPY" >&5
5402
echo "${ECHO_T}$ac_cv_HAVE___VA_COPY" >&6
5403
if test x"$ac_cv_HAVE___VA_COPY" = x"yes"; then
5405
cat >>confdefs.h <<\_ACEOF
5406
#define HAVE___VA_COPY 1
5412
echo "$as_me:$LINENO: checking for vsnprintf" >&5
5413
echo $ECHO_N "checking for vsnprintf... $ECHO_C" >&6
5414
if test "${ac_cv_func_vsnprintf+set}" = set; then
5415
echo $ECHO_N "(cached) $ECHO_C" >&6
5417
cat >conftest.$ac_ext <<_ACEOF
5420
cat confdefs.h >>conftest.$ac_ext
5421
cat >>conftest.$ac_ext <<_ACEOF
5422
/* end confdefs.h. */
5423
/* Define vsnprintf to an innocuous variant, in case <limits.h> declares vsnprintf.
5424
For example, HP-UX 11i <limits.h> declares gettimeofday. */
5425
#define vsnprintf innocuous_vsnprintf
5427
/* System header to define __stub macros and hopefully few prototypes,
5428
which can conflict with char vsnprintf (); below.
5429
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5430
<limits.h> exists even on freestanding compilers. */
5433
# include <limits.h>
5435
# include <assert.h>
5440
/* Override any gcc2 internal prototype to avoid an error. */
5445
/* We use char because int might match the return type of a gcc2
5446
builtin and then its argument prototype would still apply. */
5448
/* The GNU C library defines this for functions which it implements
5449
to always fail with ENOSYS. Some functions are actually named
5450
something starting with __ and the normal name is an alias. */
5451
#if defined (__stub_vsnprintf) || defined (__stub___vsnprintf)
5454
char (*f) () = vsnprintf;
5463
return f != vsnprintf;
5468
rm -f conftest.$ac_objext conftest$ac_exeext
5469
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5470
(eval $ac_link) 2>conftest.er1
5472
grep -v '^ *+' conftest.er1 >conftest.err
5474
cat conftest.err >&5
5475
echo "$as_me:$LINENO: \$? = $ac_status" >&5
5476
(exit $ac_status); } &&
5477
{ ac_try='test -z "$ac_c_werror_flag"
5478
|| test ! -s conftest.err'
5479
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5482
echo "$as_me:$LINENO: \$? = $ac_status" >&5
5483
(exit $ac_status); }; } &&
5484
{ ac_try='test -s conftest$ac_exeext'
5485
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5488
echo "$as_me:$LINENO: \$? = $ac_status" >&5
5489
(exit $ac_status); }; }; then
5490
ac_cv_func_vsnprintf=yes
5492
echo "$as_me: failed program was:" >&5
5493
sed 's/^/| /' conftest.$ac_ext >&5
5495
ac_cv_func_vsnprintf=no
5497
rm -f conftest.err conftest.$ac_objext \
5498
conftest$ac_exeext conftest.$ac_ext
5500
echo "$as_me:$LINENO: result: $ac_cv_func_vsnprintf" >&5
5501
echo "${ECHO_T}$ac_cv_func_vsnprintf" >&6
5502
if test $ac_cv_func_vsnprintf = yes; then
5505
SNPRINTF_O=./snprintf.o
5508
echo "$as_me:$LINENO: checking for snprintf" >&5
5509
echo $ECHO_N "checking for snprintf... $ECHO_C" >&6
5510
if test "${ac_cv_func_snprintf+set}" = set; then
5511
echo $ECHO_N "(cached) $ECHO_C" >&6
5513
cat >conftest.$ac_ext <<_ACEOF
5516
cat confdefs.h >>conftest.$ac_ext
5517
cat >>conftest.$ac_ext <<_ACEOF
5518
/* end confdefs.h. */
5519
/* Define snprintf to an innocuous variant, in case <limits.h> declares snprintf.
5520
For example, HP-UX 11i <limits.h> declares gettimeofday. */
5521
#define snprintf innocuous_snprintf
5523
/* System header to define __stub macros and hopefully few prototypes,
5524
which can conflict with char snprintf (); below.
5525
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5526
<limits.h> exists even on freestanding compilers. */
5529
# include <limits.h>
5531
# include <assert.h>
5536
/* Override any gcc2 internal prototype to avoid an error. */
5541
/* We use char because int might match the return type of a gcc2
5542
builtin and then its argument prototype would still apply. */
5544
/* The GNU C library defines this for functions which it implements
5545
to always fail with ENOSYS. Some functions are actually named
5546
something starting with __ and the normal name is an alias. */
5547
#if defined (__stub_snprintf) || defined (__stub___snprintf)
5550
char (*f) () = snprintf;
5559
return f != snprintf;
5564
rm -f conftest.$ac_objext conftest$ac_exeext
5565
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5566
(eval $ac_link) 2>conftest.er1
5568
grep -v '^ *+' conftest.er1 >conftest.err
5570
cat conftest.err >&5
5571
echo "$as_me:$LINENO: \$? = $ac_status" >&5
5572
(exit $ac_status); } &&
5573
{ ac_try='test -z "$ac_c_werror_flag"
5574
|| test ! -s conftest.err'
5575
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5578
echo "$as_me:$LINENO: \$? = $ac_status" >&5
5579
(exit $ac_status); }; } &&
5580
{ ac_try='test -s conftest$ac_exeext'
5581
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5584
echo "$as_me:$LINENO: \$? = $ac_status" >&5
5585
(exit $ac_status); }; }; then
5586
ac_cv_func_snprintf=yes
5588
echo "$as_me: failed program was:" >&5
5589
sed 's/^/| /' conftest.$ac_ext >&5
5591
ac_cv_func_snprintf=no
5593
rm -f conftest.err conftest.$ac_objext \
5594
conftest$ac_exeext conftest.$ac_ext
5596
echo "$as_me:$LINENO: result: $ac_cv_func_snprintf" >&5
5597
echo "${ECHO_T}$ac_cv_func_snprintf" >&6
5598
if test $ac_cv_func_snprintf = yes; then
5601
SNPRINTF_O=./snprintf.o
5604
echo "$as_me:$LINENO: checking for asprintf" >&5
5605
echo $ECHO_N "checking for asprintf... $ECHO_C" >&6
5606
if test "${ac_cv_func_asprintf+set}" = set; then
5607
echo $ECHO_N "(cached) $ECHO_C" >&6
5609
cat >conftest.$ac_ext <<_ACEOF
5612
cat confdefs.h >>conftest.$ac_ext
5613
cat >>conftest.$ac_ext <<_ACEOF
5614
/* end confdefs.h. */
5615
/* Define asprintf to an innocuous variant, in case <limits.h> declares asprintf.
5616
For example, HP-UX 11i <limits.h> declares gettimeofday. */
5617
#define asprintf innocuous_asprintf
5619
/* System header to define __stub macros and hopefully few prototypes,
5620
which can conflict with char asprintf (); below.
5621
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5622
<limits.h> exists even on freestanding compilers. */
5625
# include <limits.h>
5627
# include <assert.h>
5632
/* Override any gcc2 internal prototype to avoid an error. */
5637
/* We use char because int might match the return type of a gcc2
5638
builtin and then its argument prototype would still apply. */
5640
/* The GNU C library defines this for functions which it implements
5641
to always fail with ENOSYS. Some functions are actually named
5642
something starting with __ and the normal name is an alias. */
5643
#if defined (__stub_asprintf) || defined (__stub___asprintf)
5646
char (*f) () = asprintf;
5655
return f != asprintf;
5660
rm -f conftest.$ac_objext conftest$ac_exeext
5661
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5662
(eval $ac_link) 2>conftest.er1
5664
grep -v '^ *+' conftest.er1 >conftest.err
5666
cat conftest.err >&5
5667
echo "$as_me:$LINENO: \$? = $ac_status" >&5
5668
(exit $ac_status); } &&
5669
{ ac_try='test -z "$ac_c_werror_flag"
5670
|| test ! -s conftest.err'
5671
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5674
echo "$as_me:$LINENO: \$? = $ac_status" >&5
5675
(exit $ac_status); }; } &&
5676
{ ac_try='test -s conftest$ac_exeext'
5677
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5680
echo "$as_me:$LINENO: \$? = $ac_status" >&5
5681
(exit $ac_status); }; }; then
5682
ac_cv_func_asprintf=yes
5684
echo "$as_me: failed program was:" >&5
5685
sed 's/^/| /' conftest.$ac_ext >&5
5687
ac_cv_func_asprintf=no
5689
rm -f conftest.err conftest.$ac_objext \
5690
conftest$ac_exeext conftest.$ac_ext
5692
echo "$as_me:$LINENO: result: $ac_cv_func_asprintf" >&5
5693
echo "${ECHO_T}$ac_cv_func_asprintf" >&6
5694
if test $ac_cv_func_asprintf = yes; then
5697
SNPRINTF_O=./snprintf.o
5700
echo "$as_me:$LINENO: checking for vasprintf" >&5
5701
echo $ECHO_N "checking for vasprintf... $ECHO_C" >&6
5702
if test "${ac_cv_func_vasprintf+set}" = set; then
5703
echo $ECHO_N "(cached) $ECHO_C" >&6
5705
cat >conftest.$ac_ext <<_ACEOF
5708
cat confdefs.h >>conftest.$ac_ext
5709
cat >>conftest.$ac_ext <<_ACEOF
5710
/* end confdefs.h. */
5711
/* Define vasprintf to an innocuous variant, in case <limits.h> declares vasprintf.
5712
For example, HP-UX 11i <limits.h> declares gettimeofday. */
5713
#define vasprintf innocuous_vasprintf
5715
/* System header to define __stub macros and hopefully few prototypes,
5716
which can conflict with char vasprintf (); below.
5717
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5718
<limits.h> exists even on freestanding compilers. */
5721
# include <limits.h>
5723
# include <assert.h>
5728
/* Override any gcc2 internal prototype to avoid an error. */
5733
/* We use char because int might match the return type of a gcc2
5734
builtin and then its argument prototype would still apply. */
5736
/* The GNU C library defines this for functions which it implements
5737
to always fail with ENOSYS. Some functions are actually named
5738
something starting with __ and the normal name is an alias. */
5739
#if defined (__stub_vasprintf) || defined (__stub___vasprintf)
5742
char (*f) () = vasprintf;
5751
return f != vasprintf;
5756
rm -f conftest.$ac_objext conftest$ac_exeext
5757
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5758
(eval $ac_link) 2>conftest.er1
5760
grep -v '^ *+' conftest.er1 >conftest.err
5762
cat conftest.err >&5
5763
echo "$as_me:$LINENO: \$? = $ac_status" >&5
5764
(exit $ac_status); } &&
5765
{ ac_try='test -z "$ac_c_werror_flag"
5766
|| test ! -s conftest.err'
5767
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5770
echo "$as_me:$LINENO: \$? = $ac_status" >&5
5771
(exit $ac_status); }; } &&
5772
{ ac_try='test -s conftest$ac_exeext'
5773
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5776
echo "$as_me:$LINENO: \$? = $ac_status" >&5
5777
(exit $ac_status); }; }; then
5778
ac_cv_func_vasprintf=yes
5780
echo "$as_me: failed program was:" >&5
5781
sed 's/^/| /' conftest.$ac_ext >&5
5783
ac_cv_func_vasprintf=no
5785
rm -f conftest.err conftest.$ac_objext \
5786
conftest$ac_exeext conftest.$ac_ext
5788
echo "$as_me:$LINENO: result: $ac_cv_func_vasprintf" >&5
5789
echo "${ECHO_T}$ac_cv_func_vasprintf" >&6
5790
if test $ac_cv_func_vasprintf = yes; then
5793
SNPRINTF_O=./snprintf.o
5797
echo "$as_me:$LINENO: checking for C99 vsnprintf" >&5
5798
echo $ECHO_N "checking for C99 vsnprintf... $ECHO_C" >&6
5799
if test "${ac_cv_HAVE_C99_VSNPRINTF+set}" = set; then
5800
echo $ECHO_N "(cached) $ECHO_C" >&6
5803
if test "$cross_compiling" = yes; then
5804
ac_cv_HAVE_C99_VSNPRINTF=cross
5806
cat >conftest.$ac_ext <<_ACEOF
5809
cat confdefs.h >>conftest.$ac_ext
5810
cat >>conftest.$ac_ext <<_ACEOF
5811
/* end confdefs.h. */
5813
#include <sys/types.h>
5815
void foo(const char *format, ...) {
5820
va_start(ap, format);
5821
len = vsnprintf(buf, 0, format, ap);
5823
if (len != 5) exit(1);
5825
va_start(ap, format);
5826
len = vsnprintf(0, 0, format, ap);
5828
if (len != 5) exit(1);
5830
if (snprintf(buf, 3, "hello") != 5 || strcmp(buf, "he") != 0) exit(1);
5834
main() { foo("hello"); }
5837
rm -f conftest$ac_exeext
5838
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5839
(eval $ac_link) 2>&5
5841
echo "$as_me:$LINENO: \$? = $ac_status" >&5
5842
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5843
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5846
echo "$as_me:$LINENO: \$? = $ac_status" >&5
5847
(exit $ac_status); }; }; then
5848
ac_cv_HAVE_C99_VSNPRINTF=yes
5850
echo "$as_me: program exited with status $ac_status" >&5
5851
echo "$as_me: failed program was:" >&5
5852
sed 's/^/| /' conftest.$ac_ext >&5
5855
ac_cv_HAVE_C99_VSNPRINTF=no
5857
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5860
echo "$as_me:$LINENO: result: $ac_cv_HAVE_C99_VSNPRINTF" >&5
5861
echo "${ECHO_T}$ac_cv_HAVE_C99_VSNPRINTF" >&6
5862
if test x"$ac_cv_HAVE_C99_VSNPRINTF" = x"yes"; then
5864
cat >>confdefs.h <<\_ACEOF
5865
#define HAVE_C99_VSNPRINTF 1
5283
5873
for ac_func in getopt_long
6026
6626
if test x$check_for_ssl = xyes; then
6027
echo "$as_me:$LINENO: checking for SSL" >&5
6028
echo $ECHO_N "checking for SSL... $ECHO_C" >&6
6627
echo "$as_me:$LINENO: checking for SSL headers" >&5
6628
echo $ECHO_N "checking for SSL headers... $ECHO_C" >&6
6030
6630
for dir in $ssl_inc_dir $ssl_dir /usr/local/openssl /usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr /usr/freeware/lib/openssl; do
6032
6632
if test -f "$dir/include/openssl/ssl.h"; then
6034
6634
CFLAGS="$CFLAGS -I$dir/include/openssl -I$ssldir/include"
6635
sslincdir="$dir/include/openssl"
6037
6638
if test -f "$dir/include/ssl.h"; then
6039
6640
CFLAGS="$CFLAGS -I$dir/include"
6641
sslincdir="$dir/include"
6042
6644
if test -f "$dir/ssl.h"; then
6044
CFLAGS="$CFLAGS -I$dir/include"
6646
CFLAGS="$CFLAGS -I$dir"
6045
6648
ssldir="$dir/.."
6048
6651
if test -f "$dir/openssl/ssl.h"; then
6050
CFLAGS="$CFLAGS -I$dir/include"
6653
CFLAGS="$CFLAGS -I$dir/openssl"
6654
sslincdir="$dir/openssl"
6051
6655
ssldir="$dir/.."
6056
6660
if test x_$found_ssl != x_yes; then
6057
{ { echo "$as_me:$LINENO: error: Cannot find ssl libraries" >&5
6661
{ { echo "$as_me:$LINENO: error: Cannot find ssl headers" >&5
6662
echo "$as_me: error: Cannot find ssl headers" >&2;}
6663
{ (exit 1); exit 1; }; }
6666
printf "SSL headers found in $ssldir\n";
6668
echo "$as_me:$LINENO: checking for SSL libraries" >&5
6669
echo $ECHO_N "checking for SSL libraries... $ECHO_C" >&6
6671
for dir in $ssl_lib_dir $ssl_dir /usr/lib64 /usr/lib /usr/local/lib /usr/lib/ssl /usr/ssl/lib /usr/openssl/lib /usr/pkg/lib /usr/freeware/lib/openssl; do
6673
if test -f "$dir/libssl.so"; then
6679
if test x_$found_ssl != x_yes; then
6680
{ { echo "$as_me:$LINENO: error: Cannot find ssl libraries" >&5
6058
6681
echo "$as_me: error: Cannot find ssl libraries" >&2;}
6059
6682
{ (exit 1); exit 1; }; }
6061
printf "SSL found in $ssldir\n";
6062
LIBS="$LIBS -lssl -lcrypto";
6063
if test x$ssl_lib_dir != x; then
6064
LDFLAGS="$LDFLAGS -L$ssl_lib_dir";
6066
LDFLAGS="$LDFLAGS -L$ssldir/lib";
6068
cat >>confdefs.h <<_ACEOF
6684
printf "SSL libraries found in $ssllibdir\n";
6686
LDFLAGS="$LDFLAGS -L$ssllibdir";
6687
LIBS="$LIBS -lssl -lcrypto";
6689
cat >>confdefs.h <<_ACEOF
6069
6690
#define HAVE_SSL 1
6075
echo "*** Generating DH Parameters for SSL/TLS ***"
6076
if test -f "$ssldir/sbin/openssl"; then
6077
sslbin=$ssldir/sbin/openssl
6079
sslbin=$ssldir/bin/openssl
6696
echo "*** Generating DH Parameters for SSL/TLS ***"
6697
if test -f "$ssldir/sbin/openssl"; then
6698
sslbin=$ssldir/sbin/openssl
6700
sslbin=$ssldir/bin/openssl
6702
# awk to strip off meta data at bottom of dhparam output
6703
$sslbin dhparam -C 512 | awk '/^-----/ {exit} {print}' > include/dh.h
6081
# awk to strip off meta data at bottom of dhparam output
6082
$sslbin dhparam -C 512 | awk '/^-----/ {exit} {print}' > include/dh.h
6085
6707
echo "$as_me:$LINENO: checking for Kerberos include files" >&5