Newer
Older
25001
25002
25003
25004
25005
25006
25007
25008
25009
25010
25011
25012
25013
25014
25015
25016
25017
25018
25019
25020
25021
25022
25023
25024
25025
25026
25027
25028
25029
25030
25031
25032
25033
25034
25035
25036
25037
25038
25039
25040
25041
25042
25043
25044
25045
25046
25047
25048
25049
25050
25051
25052
25053
25054
25055
25056
25057
25058
25059
25060
25061
25062
25063
25064
25065
25066
25067
25068
25069
25070
25071
25072
25073
25074
25075
25076
25077
25078
25079
25080
25081
25082
25083
25084
25085
25086
25087
25088
25089
25090
25091
25092
25093
25094
25095
25096
25097
25098
25099
25100
25101
25102
25103
25104
25105
25106
25107
25108
25109
25110
25111
25112
25113
25114
25115
25116
25117
25118
25119
25120
25121
25122
25123
25124
25125
25126
25127
25128
25129
25130
25131
25132
25133
25134
25135
25136
25137
25138
25139
25140
25141
25142
25143
25144
25145
25146
25147
25148
25149
25150
25151
25152
25153
25154
25155
25156
25157
25158
25159
25160
25161
25162
25163
25164
25165
25166
25167
25168
25169
25170
25171
25172
25173
25174
25175
25176
25177
25178
25179
25180
25181
25182
25183
25184
25185
25186
25187
25188
25189
25190
25191
25192
25193
25194
25195
25196
25197
25198
25199
25200
25201
25202
25203
25204
25205
25206
25207
25208
25209
25210
25211
25212
25213
25214
25215
25216
25217
25218
25219
25220
25221
25222
25223
25224
25225
25226
25227
25228
25229
25230
25231
25232
25233
25234
25235
25236
25237
25238
25239
25240
25241
25242
25243
25244
25245
25246
25247
25248
25249
25250
25251
25252
25253
25254
25255
25256
25257
25258
25259
25260
25261
25262
25263
25264
25265
25266
25267
25268
25269
25270
25271
25272
25273
25274
25275
25276
25277
25278
25279
25280
25281
25282
25283
25284
25285
25286
25287
25288
25289
25290
25291
25292
25293
25294
25295
25296
25297
25298
25299
25300
25301
25302
25303
25304
25305
25306
25307
25308
25309
25310
25311
25312
25313
25314
25315
25316
25317
25318
25319
25320
25321
25322
25323
25324
25325
25326
25327
25328
25329
25330
25331
25332
25333
25334
25335
25336
25337
25338
25339
25340
25341
25342
25343
25344
25345
25346
25347
25348
25349
25350
25351
25352
25353
25354
25355
25356
25357
25358
25359
25360
25361
25362
25363
25364
25365
25366
25367
25368
25369
25370
25371
25372
25373
25374
25375
25376
25377
25378
25379
25380
25381
25382
25383
25384
25385
25386
25387
25388
25389
25390
25391
25392
25393
25394
25395
25396
25397
25398
25399
25400
25401
25402
25403
25404
25405
25406
25407
25408
25409
25410
25411
25412
25413
25414
25415
25416
25417
25418
25419
25420
25421
25422
25423
25424
25425
25426
25427
25428
25429
25430
25431
25432
25433
25434
25435
25436
25437
25438
25439
25440
25441
25442
25443
25444
25445
25446
25447
25448
25449
25450
25451
25452
25453
25454
25455
25456
25457
25458
25459
25460
25461
25462
25463
25464
25465
25466
25467
25468
25469
25470
25471
25472
25473
25474
25475
25476
25477
25478
25479
25480
25481
25482
25483
25484
25485
25486
25487
25488
25489
25490
25491
25492
25493
25494
25495
25496
25497
25498
25499
25500
25501
25502
25503
25504
25505
25506
25507
25508
25509
25510
25511
25512
25513
25514
25515
25516
25517
25518
25519
25520
25521
25522
25523
25524
25525
25526
25527
25528
25529
25530
25531
25532
25533
25534
25535
25536
25537
25538
25539
25540
25541
25542
25543
25544
25545
25546
25547
25548
25549
25550
25551
25552
25553
25554
25555
25556
25557
25558
25559
25560
25561
25562
25563
25564
25565
25566
25567
25568
25569
25570
25571
25572
25573
25574
25575
25576
25577
25578
25579
25580
25581
25582
25583
25584
25585
25586
25587
25588
25589
25590
25591
25592
25593
25594
25595
25596
25597
25598
25599
25600
25601
25602
25603
25604
25605
25606
25607
25608
25609
25610
25611
25612
25613
25614
25615
25616
25617
25618
25619
25620
25621
25622
25623
25624
25625
25626
25627
25628
25629
25630
25631
25632
25633
25634
25635
25636
25637
25638
25639
25640
25641
25642
25643
25644
25645
25646
25647
25648
25649
25650
25651
25652
25653
25654
25655
25656
25657
25658
25659
25660
25661
25662
25663
25664
25665
25666
25667
25668
25669
25670
25671
25672
25673
25674
25675
25676
25677
25678
25679
25680
25681
25682
25683
25684
25685
25686
25687
25688
25689
25690
25691
25692
25693
25694
25695
25696
25697
25698
25699
25700
25701
25702
25703
25704
25705
25706
25707
25708
25709
25710
25711
25712
25713
25714
25715
25716
25717
25718
25719
25720
25721
25722
25723
25724
25725
25726
25727
25728
25729
25730
25731
25732
25733
25734
25735
25736
25737
25738
25739
25740
25741
25742
25743
25744
25745
25746
25747
25748
25749
25750
25751
25752
25753
25754
25755
25756
25757
25758
25759
25760
25761
25762
25763
25764
25765
25766
25767
25768
25769
25770
25771
25772
25773
25774
25775
25776
25777
25778
25779
25780
25781
25782
25783
25784
25785
25786
25787
25788
25789
25790
25791
25792
25793
25794
25795
25796
25797
25798
25799
25800
25801
25802
25803
25804
25805
25806
25807
25808
25809
25810
25811
25812
25813
25814
25815
25816
25817
25818
25819
25820
25821
25822
25823
25824
25825
25826
25827
25828
25829
25830
25831
25832
25833
25834
25835
25836
25837
25838
25839
25840
25841
25842
25843
25844
25845
25846
25847
25848
25849
25850
25851
25852
25853
25854
25855
25856
25857
25858
25859
25860
25861
25862
25863
25864
25865
25866
25867
25868
25869
25870
25871
25872
25873
25874
25875
25876
25877
25878
25879
25880
25881
25882
25883
25884
25885
25886
25887
25888
25889
25890
25891
25892
25893
25894
25895
25896
25897
25898
25899
25900
25901
25902
25903
25904
25905
25906
25907
25908
25909
25910
25911
25912
25913
25914
25915
25916
25917
25918
25919
25920
25921
25922
25923
25924
25925
25926
25927
25928
25929
25930
25931
25932
25933
25934
25935
25936
25937
25938
25939
25940
25941
25942
25943
25944
25945
25946
25947
25948
25949
25950
25951
25952
25953
25954
25955
25956
25957
25958
25959
25960
25961
25962
25963
25964
25965
25966
25967
25968
25969
25970
25971
25972
25973
25974
25975
25976
25977
25978
25979
25980
25981
25982
25983
25984
25985
25986
25987
25988
25989
25990
25991
25992
25993
25994
25995
25996
25997
25998
25999
26000
return use_ascii (foo) == use_ebcdic (foo);
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
ac_cv_c_bigendian=yes
fi
if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
if test "$ac_cv_c_bigendian" = unknown; then
ac_cv_c_bigendian=no
else
# finding both strings is unlikely to happen, but who knows?
ac_cv_c_bigendian=unknown
fi
fi
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
/* Are we little or big endian? From Harbison&Steele. */
union
{
long int l;
char c[sizeof (long int)];
} u;
u.l = 1;
return u.c[sizeof (long int) - 1] == 1;
;
return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
ac_cv_c_bigendian=no
else
ac_cv_c_bigendian=yes
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
$as_echo "$ac_cv_c_bigendian" >&6; }
case $ac_cv_c_bigendian in #(
yes)
$as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
;; #(
no)
;; #(
universal)
$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
;; #(
*)
as_fn_error $? "unknown endianness
presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
esac
if test $ac_cv_c_bigendian = yes; then
bigendian=1
else
bigendian=0
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of struct iovec" >&5
$as_echo_n "checking size of struct iovec... " >&6; }
if ${ac_cv_sizeof_struct_iovec+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
ac_cv_sizeof_struct_iovec=0
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdio.h>
#include <sys/types.h>
#include <sys/uio.h>
#ifdef WIN32
#define binmode "b"
#else
#define binmode
#endif
main()
{
FILE *f=fopen("conftestval", "w" binmode);
if (!f) exit(1);
fprintf(f, "%d\n", sizeof(struct iovec));
exit(0);
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
ac_cv_sizeof_struct_iovec=`cat conftestval`
else
ac_cv_sizeof_struct_iovec=0
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_struct_iovec" >&5
$as_echo "$ac_cv_sizeof_struct_iovec" >&6; }
cat >>confdefs.h <<_ACEOF
#define SIZEOF_STRUCT_IOVEC $ac_cv_sizeof_struct_iovec
_ACEOF
if test "$ac_cv_sizeof_struct_iovec" = "0"; then
have_iovec=0
else
have_iovec=1
fi
for ac_func in strnicmp
do :
ac_fn_c_check_func "$LINENO" "strnicmp" "ac_cv_func_strnicmp"
if test "x$ac_cv_func_strnicmp" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STRNICMP 1
_ACEOF
have_strnicmp="1"
else
have_strnicmp="0"
fi
done
for ac_func in strncasecmp
do :
ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
if test "x$ac_cv_func_strncasecmp" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STRNCASECMP 1
_ACEOF
have_strncasecmp="1"
else
have_strncasecmp="0"
fi
done
for ac_func in stricmp
do :
ac_fn_c_check_func "$LINENO" "stricmp" "ac_cv_func_stricmp"
if test "x$ac_cv_func_stricmp" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STRICMP 1
_ACEOF
have_stricmp="1"
else
have_stricmp="0"
fi
done
for ac_func in strcasecmp
do :
ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
if test "x$ac_cv_func_strcasecmp" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STRCASECMP 1
_ACEOF
have_strcasecmp="1"
else
have_strcasecmp="0"
fi
done
for ac_func in strdup
do :
ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
if test "x$ac_cv_func_strdup" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STRDUP 1
_ACEOF
have_strdup="1"
else
have_strdup="0"
fi
done
for ac_func in strstr
do :
ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr"
if test "x$ac_cv_func_strstr" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STRSTR 1
_ACEOF
have_strstr="1"
else
have_strstr="0"
fi
done
for ac_func in memchr
do :
ac_fn_c_check_func "$LINENO" "memchr" "ac_cv_func_memchr"
if test "x$ac_cv_func_memchr" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_MEMCHR 1
_ACEOF
have_memchr="1"
else
have_memchr="0"
fi
done
as_ac_var=`$as_echo "ac_cv_func_$int64_strfn" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$int64_strfn" "$as_ac_var"
if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
have_int64_strfn="1"
else
have_int64_strfn="0"
fi
if test "$have_int64_strfn" = "0" && test "$int64_strfn" = "strtoll"; then
int64_strfn="strtoq"
ac_fn_c_check_func "$LINENO" "strtoq" "ac_cv_func_strtoq"
if test "x$ac_cv_func_strtoq" = xyes; then :
have_int64_strfn=1
else
have_int64_strfn=0
fi
fi
if test "$have_int64_strfn" = "1"; then
cat >>confdefs.h <<_ACEOF
#define APR_INT64_STRFN $int64_strfn
_ACEOF
fi
if test "$off_t_strfn" = "apr_strtoi64" && test "$have_int64_strfn" = "1"; then
off_t_strfn=$int64_strfn
fi
cat >>confdefs.h <<_ACEOF
#define APR_OFF_T_STRFN $off_t_strfn
_ACEOF
echo "${nl}Checking for DSO..."
# Check whether --enable-dso was given.
if test "${enable_dso+set}" = set; then :
enableval=$enable_dso; if test "x$enableval" = "xyes"; then
dsotype=any
else
dsotype=$enableval
fi
else
dsotype=any
fi
if test "$dsotype" = "any"; then
if test "$dsotype" = "any"; then
case $host in
*darwin[0-8]\.*)
# Original Darwin, not for 9.0!:
ac_fn_c_check_func "$LINENO" "NSLinkModule" "ac_cv_func_NSLinkModule"
if test "x$ac_cv_func_NSLinkModule" = xyes; then :
dsotype=dyld
fi
;;
hppa*-hpux[1-9]\.*|hppa*-hpux1[01]*)
# shl is specific to parisc hpux SOM binaries, not used for 64 bit
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
$as_echo_n "checking for shl_load in -ldld... " >&6; }
if ${ac_cv_lib_dld_shl_load+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldld $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char shl_load ();
int
main ()
{
return shl_load ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_dld_shl_load=yes
else
ac_cv_lib_dld_shl_load=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
have_shl=1
fi
if test "$ac_cv_sizeof_voidp$have_shl" = "41"; then
dsotype=shl;
if test "x$LIBS" = "x"; then
test "x$silent" != "xyes" && echo " setting LIBS to \"-ldld\""
LIBS="-ldld"
else
apr_addto_bugger="-ldld"
for i in $apr_addto_bugger; do
apr_addto_duplicate="0"
for j in $LIBS; do
if test "x$i" = "x$j"; then
apr_addto_duplicate="1"
break
fi
done
if test $apr_addto_duplicate = "0"; then
test "x$silent" != "xyes" && echo " adding \"$i\" to LIBS"
LIBS="$LIBS $i"
fi
done
fi
fi;;
*mingw*|*-os2*)
# several 'other's below probably belong up here. If they always
# use a platform implementation and shouldn't test the dlopen/dlfcn
# features, then bring them up here.
# But if they -should- optionally use dlfcn, and/or need the config
# detection of dlopen/dlsym, do not move them up.
dsotype=other ;;
esac
fi
# Normal POSIX:
if test "$dsotype" = "any"; then
ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
if test "x$ac_cv_func_dlopen" = xyes; then :
dsotype=dlfcn
fi
fi
if test "$dsotype" = "any"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
$as_echo_n "checking for dlopen in -ldl... " >&6; }
if ${ac_cv_lib_dl_dlopen+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char dlopen ();
int
main ()
{
return dlopen ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_dl_dlopen=yes
else
ac_cv_lib_dl_dlopen=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
dsotype=dlfcn;
if test "x$LIBS" = "x"; then
test "x$silent" != "xyes" && echo " setting LIBS to \"-ldl\""
LIBS="-ldl"
else
apr_addto_bugger="-ldl"
for i in $apr_addto_bugger; do
apr_addto_duplicate="0"
for j in $LIBS; do
if test "x$i" = "x$j"; then
apr_addto_duplicate="1"
break
fi
done
if test $apr_addto_duplicate = "0"; then
test "x$silent" != "xyes" && echo " adding \"$i\" to LIBS"
LIBS="$LIBS $i"
fi
done
fi
fi
fi
if test "$dsotype" = "dlfcn"; then
# ReliantUnix has dlopen() in libc but dlsym() in libdl :(
ac_fn_c_check_func "$LINENO" "dlsym" "ac_cv_func_dlsym"
if test "x$ac_cv_func_dlsym" = xyes; then :
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5
$as_echo_n "checking for dlsym in -ldl... " >&6; }
if ${ac_cv_lib_dl_dlsym+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char dlsym ();
int
main ()
{
return dlsym ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_dl_dlsym=yes
else
ac_cv_lib_dl_dlsym=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5
$as_echo "$ac_cv_lib_dl_dlsym" >&6; }
if test "x$ac_cv_lib_dl_dlsym" = xyes; then :
if test "x$LIBS" = "x"; then
test "x$silent" != "xyes" && echo " setting LIBS to \"-ldl\""
LIBS="-ldl"
else
apr_addto_bugger="-ldl"
for i in $apr_addto_bugger; do
apr_addto_duplicate="0"
for j in $LIBS; do
if test "x$i" = "x$j"; then
apr_addto_duplicate="1"
break
fi
done
if test $apr_addto_duplicate = "0"; then
test "x$silent" != "xyes" && echo " adding \"$i\" to LIBS"
LIBS="$LIBS $i"
fi
done
fi
else
dsotype=any
echo "Weird: dlopen() was found but dlsym() was not found!"
fi
fi
fi
if test "$dsotype" = "any"; then
# BeOS:
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for load_image in -lroot" >&5
$as_echo_n "checking for load_image in -lroot... " >&6; }
if ${ac_cv_lib_root_load_image+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lroot $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char load_image ();
int
main ()
{
return load_image ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_root_load_image=yes
else
ac_cv_lib_root_load_image=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_root_load_image" >&5
$as_echo "$ac_cv_lib_root_load_image" >&6; }
if test "x$ac_cv_lib_root_load_image" = xyes; then :
dsotype=other
fi
fi
# Everything else:
if test "$dsotype" = "any"; then
case $host in
*os390|*os400|*-aix*)
# Some -aix5 will use dl, no hassles. Keep that pattern here.
dsotype=other ;;
*-hpux*)
if test "$have_shl" = "1"; then
dsotype=shl;
if test "x$LIBS" = "x"; then
test "x$silent" != "xyes" && echo " setting LIBS to \"-ldld\""
LIBS="-ldld"
else
apr_addto_bugger="-ldld"
for i in $apr_addto_bugger; do
apr_addto_duplicate="0"
for j in $LIBS; do
if test "x$i" = "x$j"; then
apr_addto_duplicate="1"
break
fi
done
if test $apr_addto_duplicate = "0"; then
test "x$silent" != "xyes" && echo " adding \"$i\" to LIBS"
LIBS="$LIBS $i"
fi
done
fi
fi;;
esac
fi
fi
if test "$dsotype" = "any"; then
as_fn_error $? "Could not detect suitable DSO implementation" "$LINENO" 5
elif test "$dsotype" = "no"; then
aprdso="0"
else
case "$dsotype" in
dlfcn)
$as_echo "#define DSO_USE_DLFCN 1" >>confdefs.h
;;
shl)
$as_echo "#define DSO_USE_SHL 1" >>confdefs.h
;;
dyld)
$as_echo "#define DSO_USE_DYLD 1" >>confdefs.h
;;
other) ;; # Use whatever is in dso/OSDIR
*) as_fn_error $? "Unknown DSO implementation \"$dsotype\"" "$LINENO" 5;;
esac
aprdso="1"
apr_modules="$apr_modules dso"
fi
echo "${nl}Checking for Processes..."
for ac_func in waitpid
do :
ac_fn_c_check_func "$LINENO" "waitpid" "ac_cv_func_waitpid"
if test "x$ac_cv_func_waitpid" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_WAITPID 1
_ACEOF
fi
done
# Check whether --enable-other-child was given.
if test "${enable_other_child+set}" = set; then :
enableval=$enable_other_child; if test "$enableval" = "yes"; then
oc="1"
else
oc="0"
fi
else
oc=1
fi
if test -z "$have_proc_invoked"; then
have_proc_invoked="0"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Variable Length Arrays" >&5
$as_echo_n "checking for Variable Length Arrays... " >&6; }
apr_save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $CFLAGS_WARN"
if test "$ac_cv_c_compiler_gnu" = "yes"; then
CFLAGS="$CFLAGS -Werror"
fi
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include "confdefs.h"
int main(int argc, const char *const *argv) {
int foo[argc];
foo[0] = 0;
return 0; }
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
vla_msg=yes
else
vla_msg=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
CFLAGS=$apr_save_CFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $vla_msg" >&5
$as_echo "$vla_msg" >&6; }
if test "$vla_msg" = "yes"; then
$as_echo "#define HAVE_VLA 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking struct rlimit" >&5
$as_echo_n "checking struct rlimit... " >&6; }
if ${ac_cv_struct_rlimit+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
ac_cv_struct_rlimit=no
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
main()
{
struct rlimit limit;
limit.rlim_cur = 0;
limit.rlim_max = 0;
exit(0);
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
ac_cv_struct_rlimit=yes
else
ac_cv_struct_rlimit=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_rlimit" >&5
$as_echo "$ac_cv_struct_rlimit" >&6; }
struct_rlimit=0
test "x$ac_cv_struct_rlimit" = xyes && struct_rlimit=1
echo "${nl}Checking for Locking..."
for ac_func in semget semctl flock
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
done
for ac_header in semaphore.h OS.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_open" >&5
$as_echo_n "checking for library containing sem_open... " >&6; }
if ${ac_cv_search_sem_open+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_func_search_save_LIBS=$LIBS
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char sem_open ();
int
main ()
{
return sem_open ();
;
return 0;
}
_ACEOF
for ac_lib in '' rt; do
if test -z "$ac_lib"; then
ac_res="none required"
else
ac_res=-l$ac_lib
LIBS="-l$ac_lib $ac_func_search_save_LIBS"
fi
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_search_sem_open=$ac_res
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext
if ${ac_cv_search_sem_open+:} false; then :
break
fi
done
if ${ac_cv_search_sem_open+:} false; then :
else
ac_cv_search_sem_open=no
fi
rm conftest.$ac_ext
LIBS=$ac_func_search_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_open" >&5
$as_echo "$ac_cv_search_sem_open" >&6; }
ac_res=$ac_cv_search_sem_open
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
fi
for ac_func in sem_close sem_unlink sem_post sem_wait create_sem
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
done
# Some systems return ENOSYS from sem_open.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working sem_open" >&5
$as_echo_n "checking for working sem_open... " >&6; }
if ${ac_cv_func_sem_open+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
ac_cv_func_sem_open=no
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <errno.h>
#include <stdlib.h>
#include <fcntl.h>
#include <semaphore.h>
#ifndef SEM_FAILED
#define SEM_FAILED (-1)
#endif
main()
{
sem_t *psem;
const char *sem_name = "/apr_autoconf";
psem = sem_open(sem_name, O_CREAT, 0644, 1);
if (psem == (sem_t *)SEM_FAILED) {
exit(1);
}
sem_close(psem);
psem = sem_open(sem_name, O_CREAT | O_EXCL, 0644, 1);
if (psem != (sem_t *)SEM_FAILED) {
sem_close(psem);
exit(1);
}
sem_unlink(sem_name);
exit(0);
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
ac_cv_func_sem_open=yes
else
ac_cv_func_sem_open=no
fi
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
conftest.$ac_objext conftest.beam conftest.$ac_ext
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_sem_open" >&5
$as_echo "$ac_cv_func_sem_open" >&6; }
# It's stupid, but not all platforms have union semun, even those that need it.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for union semun in sys/sem.h" >&5
$as_echo_n "checking for union semun in sys/sem.h... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>
int
main ()
{
union semun arg;
semctl(0, 0, 0, arg);
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
have_union_semun="1" union_semun=yes
msg=yes
else
have_union_semun="0"
msg=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $msg" >&5
$as_echo "$msg" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LOCK_EX in sys/file.h" >&5
$as_echo_n "checking for LOCK_EX in sys/file.h... " >&6; }
if ${ac_cv_define_LOCK_EX+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/file.h>
#ifdef LOCK_EX
YES_IS_DEFINED
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "YES_IS_DEFINED" >/dev/null 2>&1; then :
ac_cv_define_LOCK_EX=yes
else
ac_cv_define_LOCK_EX=no
fi
rm -f conftest*
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_define_LOCK_EX" >&5
$as_echo "$ac_cv_define_LOCK_EX" >&6; }
if test "$ac_cv_define_LOCK_EX" = "yes"; then
$as_echo "#define HAVE_LOCK_EX 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for F_SETLK in fcntl.h" >&5
$as_echo_n "checking for F_SETLK in fcntl.h... " >&6; }
if ${ac_cv_define_F_SETLK+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <fcntl.h>
#ifdef F_SETLK
YES_IS_DEFINED
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "YES_IS_DEFINED" >/dev/null 2>&1; then :
ac_cv_define_F_SETLK=yes
else
ac_cv_define_F_SETLK=no
fi
rm -f conftest*
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_define_F_SETLK" >&5
$as_echo "$ac_cv_define_F_SETLK" >&6; }
if test "$ac_cv_define_F_SETLK" = "yes"; then
$as_echo "#define HAVE_F_SETLK 1" >>confdefs.h
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SEM_UNDO in sys/sem.h" >&5
$as_echo_n "checking for SEM_UNDO in sys/sem.h... " >&6; }
if ${ac_cv_define_SEM_UNDO+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <sys/sem.h>
#ifdef SEM_UNDO