Newer
Older
18001
18002
18003
18004
18005
18006
18007
18008
18009
18010
18011
18012
18013
18014
18015
18016
18017
18018
18019
18020
18021
18022
18023
18024
18025
18026
18027
18028
18029
18030
18031
18032
18033
18034
18035
18036
18037
18038
18039
18040
18041
18042
18043
18044
18045
18046
18047
18048
18049
18050
18051
18052
18053
18054
18055
18056
18057
18058
18059
18060
18061
18062
18063
18064
18065
18066
18067
18068
18069
18070
18071
18072
18073
18074
18075
18076
18077
18078
18079
18080
18081
18082
18083
18084
18085
18086
18087
18088
18089
18090
18091
18092
18093
18094
18095
18096
18097
18098
18099
18100
18101
18102
18103
18104
18105
18106
18107
18108
18109
18110
18111
18112
18113
18114
18115
18116
18117
18118
18119
18120
18121
18122
18123
18124
18125
18126
18127
18128
18129
18130
18131
18132
18133
18134
18135
18136
18137
18138
18139
18140
18141
18142
18143
18144
18145
18146
18147
18148
18149
18150
18151
18152
18153
18154
18155
18156
18157
18158
18159
18160
18161
18162
18163
18164
18165
18166
18167
18168
18169
18170
18171
18172
18173
18174
18175
18176
18177
18178
18179
18180
18181
18182
18183
18184
18185
18186
18187
18188
18189
18190
18191
18192
18193
18194
18195
18196
18197
18198
18199
18200
18201
18202
18203
18204
18205
18206
18207
18208
18209
18210
18211
18212
18213
18214
18215
18216
18217
18218
18219
18220
18221
18222
18223
18224
18225
18226
18227
18228
18229
18230
18231
18232
18233
18234
18235
18236
18237
18238
18239
18240
18241
18242
18243
18244
18245
18246
18247
18248
18249
18250
18251
18252
18253
18254
18255
18256
18257
18258
18259
18260
18261
18262
18263
18264
18265
18266
18267
18268
18269
18270
18271
18272
18273
18274
18275
18276
18277
18278
18279
18280
18281
18282
18283
18284
18285
18286
18287
18288
18289
18290
18291
18292
18293
18294
18295
18296
18297
18298
18299
18300
18301
18302
18303
18304
18305
18306
18307
18308
18309
18310
18311
18312
18313
18314
18315
18316
18317
18318
18319
18320
18321
18322
18323
18324
18325
18326
18327
18328
18329
18330
18331
18332
18333
18334
18335
18336
18337
18338
18339
18340
18341
18342
18343
18344
18345
18346
18347
18348
18349
18350
18351
18352
18353
18354
18355
18356
18357
18358
18359
18360
18361
18362
18363
18364
18365
18366
18367
18368
18369
18370
18371
18372
18373
18374
18375
18376
18377
18378
18379
18380
18381
18382
18383
18384
18385
18386
18387
18388
18389
18390
18391
18392
18393
18394
18395
18396
18397
18398
18399
18400
18401
18402
18403
18404
18405
18406
18407
18408
18409
18410
18411
18412
18413
18414
18415
18416
18417
18418
18419
18420
18421
18422
18423
18424
18425
18426
18427
18428
18429
18430
18431
18432
18433
18434
18435
18436
18437
18438
18439
18440
18441
18442
18443
18444
18445
18446
18447
18448
18449
18450
18451
18452
18453
18454
18455
18456
18457
18458
18459
18460
18461
18462
18463
18464
18465
18466
18467
18468
18469
18470
18471
18472
18473
18474
18475
18476
18477
18478
18479
18480
18481
18482
18483
18484
18485
18486
18487
18488
18489
18490
18491
18492
18493
18494
18495
18496
18497
18498
18499
18500
18501
18502
18503
18504
18505
18506
18507
18508
18509
18510
18511
18512
18513
18514
18515
18516
18517
18518
18519
18520
18521
18522
18523
18524
18525
18526
18527
18528
18529
18530
18531
18532
18533
18534
18535
18536
18537
18538
18539
18540
18541
18542
18543
18544
18545
18546
18547
18548
18549
18550
18551
18552
18553
18554
18555
18556
18557
18558
18559
18560
18561
18562
18563
18564
18565
18566
18567
18568
18569
18570
18571
18572
18573
18574
18575
18576
18577
18578
18579
18580
18581
18582
18583
18584
18585
18586
18587
18588
18589
18590
18591
18592
18593
18594
18595
18596
18597
18598
18599
18600
18601
18602
18603
18604
18605
18606
18607
18608
18609
18610
18611
18612
18613
18614
18615
18616
18617
18618
18619
18620
18621
18622
18623
18624
18625
18626
18627
18628
18629
18630
18631
18632
18633
18634
18635
18636
18637
18638
18639
18640
18641
18642
18643
18644
18645
18646
18647
18648
18649
18650
18651
18652
18653
18654
18655
18656
18657
18658
18659
18660
18661
18662
18663
18664
18665
18666
18667
18668
18669
18670
18671
18672
18673
18674
18675
18676
18677
18678
18679
18680
18681
18682
18683
18684
18685
18686
18687
18688
18689
18690
18691
18692
18693
18694
18695
18696
18697
18698
18699
18700
18701
18702
18703
18704
18705
18706
18707
18708
18709
18710
18711
18712
18713
18714
18715
18716
18717
18718
18719
18720
18721
18722
18723
18724
18725
18726
18727
18728
18729
18730
18731
18732
18733
18734
18735
18736
18737
18738
18739
18740
18741
18742
18743
18744
18745
18746
18747
18748
18749
18750
18751
18752
18753
18754
18755
18756
18757
18758
18759
18760
18761
18762
18763
18764
18765
18766
18767
18768
18769
18770
18771
18772
18773
18774
18775
18776
18777
18778
18779
18780
18781
18782
18783
18784
18785
18786
18787
18788
18789
18790
18791
18792
18793
18794
18795
18796
18797
18798
18799
18800
18801
18802
18803
18804
18805
18806
18807
18808
18809
18810
18811
18812
18813
18814
18815
18816
18817
18818
18819
18820
18821
18822
18823
18824
18825
18826
18827
18828
18829
18830
18831
18832
18833
18834
18835
18836
18837
18838
18839
18840
18841
18842
18843
18844
18845
18846
18847
18848
18849
18850
18851
18852
18853
18854
18855
18856
18857
18858
18859
18860
18861
18862
18863
18864
18865
18866
18867
18868
18869
18870
18871
18872
18873
18874
18875
18876
18877
18878
18879
18880
18881
18882
18883
18884
18885
18886
18887
18888
18889
18890
18891
18892
18893
18894
18895
18896
18897
18898
18899
18900
18901
18902
18903
18904
18905
18906
18907
18908
18909
18910
18911
18912
18913
18914
18915
18916
18917
18918
18919
18920
18921
18922
18923
18924
18925
18926
18927
18928
18929
18930
18931
18932
18933
18934
18935
18936
18937
18938
18939
18940
18941
18942
18943
18944
18945
18946
18947
18948
18949
18950
18951
18952
18953
18954
18955
18956
18957
18958
18959
18960
18961
18962
18963
18964
18965
18966
18967
18968
18969
18970
18971
18972
18973
18974
18975
18976
18977
18978
18979
18980
18981
18982
18983
18984
18985
18986
18987
18988
18989
18990
18991
18992
18993
18994
18995
18996
18997
18998
18999
19000
# endif
#endif
/* When -fvisibility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
int fnord () __attribute__((visibility("default")));
#endif
int fnord () { return 42; }
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
int status = $lt_dlunknown;
if (self)
{
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
else
{
if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
else puts (dlerror ());
}
/* dlclose (self); */
}
else
puts (dlerror ());
return status;
}
_LT_EOF
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
(eval $ac_link) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
(./conftest; exit; ) >&5 2>/dev/null
lt_status=$?
case x$lt_status in
x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
esac
else :
# compilation failed
lt_cv_dlopen_self=no
fi
fi
rm -fr conftest*
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
$as_echo "$lt_cv_dlopen_self" >&6; }
if test yes = "$lt_cv_dlopen_self"; then
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
if ${lt_cv_dlopen_self_static+:} false; then :
$as_echo_n "(cached) " >&6
else
if test yes = "$cross_compiling"; then :
lt_cv_dlopen_self_static=cross
else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line $LINENO "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
#include <dlfcn.h>
#endif
#include <stdio.h>
#ifdef RTLD_GLOBAL
# define LT_DLGLOBAL RTLD_GLOBAL
#else
# ifdef DL_GLOBAL
# define LT_DLGLOBAL DL_GLOBAL
# else
# define LT_DLGLOBAL 0
# endif
#endif
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
find out it does not work in some platform. */
#ifndef LT_DLLAZY_OR_NOW
# ifdef RTLD_LAZY
# define LT_DLLAZY_OR_NOW RTLD_LAZY
# else
# ifdef DL_LAZY
# define LT_DLLAZY_OR_NOW DL_LAZY
# else
# ifdef RTLD_NOW
# define LT_DLLAZY_OR_NOW RTLD_NOW
# else
# ifdef DL_NOW
# define LT_DLLAZY_OR_NOW DL_NOW
# else
# define LT_DLLAZY_OR_NOW 0
# endif
# endif
# endif
# endif
#endif
/* When -fvisibility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
int fnord () __attribute__((visibility("default")));
#endif
int fnord () { return 42; }
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
int status = $lt_dlunknown;
if (self)
{
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
else
{
if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
else puts (dlerror ());
}
/* dlclose (self); */
}
else
puts (dlerror ());
return status;
}
_LT_EOF
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
(eval $ac_link) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
(./conftest; exit; ) >&5 2>/dev/null
lt_status=$?
case x$lt_status in
x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
esac
else :
# compilation failed
lt_cv_dlopen_self_static=no
fi
fi
rm -fr conftest*
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
$as_echo "$lt_cv_dlopen_self_static" >&6; }
fi
CPPFLAGS=$save_CPPFLAGS
LDFLAGS=$save_LDFLAGS
LIBS=$save_LIBS
;;
esac
case $lt_cv_dlopen_self in
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
*) enable_dlopen_self=unknown ;;
esac
case $lt_cv_dlopen_self_static in
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
*) enable_dlopen_self_static=unknown ;;
esac
fi
striplib=
old_striplib=
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
$as_echo_n "checking whether stripping libraries is possible... " >&6; }
if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
# FIXME - insert some real tests, host_os isn't really good enough
case $host_os in
darwin*)
if test -n "$STRIP"; then
striplib="$STRIP -x"
old_striplib="$STRIP -S"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
;;
*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
;;
esac
fi
# Report what library types will actually be built
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
$as_echo_n "checking if libtool supports shared libraries... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
$as_echo "$can_build_shared" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
$as_echo_n "checking whether to build shared libraries... " >&6; }
test no = "$can_build_shared" && enable_shared=no
# On AIX, shared libraries and static libraries use the same namespace, and
# are all built from PIC.
case $host_os in
aix3*)
test yes = "$enable_shared" && enable_static=no
if test -n "$RANLIB"; then
archive_cmds="$archive_cmds~\$RANLIB \$lib"
postinstall_cmds='$RANLIB $lib'
fi
;;
aix[4-9]*)
if test ia64 != "$host_cpu"; then
case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
yes,aix,yes) ;; # shared object as lib.so file only
yes,svr4,*) ;; # shared object as lib.so archive member only
yes,*) enable_static=no ;; # shared object in lib.a archive as well
esac
fi
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
$as_echo "$enable_shared" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
$as_echo_n "checking whether to build static libraries... " >&6; }
# Make sure either enable_shared or enable_static is yes.
test yes = "$enable_shared" || enable_static=yes
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
$as_echo "$enable_static" >&6; }
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
CC=$lt_save_CC
ac_config_commands="$ac_config_commands libtool"
# Only expand once:
# get libtool's setting of shlibpath_var
eval `grep "^shlibpath_var=[A-Z_]*$" $apr_builddir/libtool`
if test "x$shlibpath_var" = "x"; then
shlibpath_var=REPLACE_WITH_YOUR_SHLIBPATH_VAR
fi
fi
;;
esac
# Check whether --with-installbuilddir was given.
if test "${with_installbuilddir+set}" = set; then :
withval=$with_installbuilddir; installbuilddir=$withval
else
installbuilddir="${datadir}/build-${APR_MAJOR_VERSION}"
fi
# Check whether --with-libtool was given.
if test "${with_libtool+set}" = set; then :
withval=$with_libtool; use_libtool=$withval
else
use_libtool="yes"
fi
if test "x$use_libtool" = "xyes"; then
lt_compile='$(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE) -o $@ -c $< && touch $@'
LT_VERSION="-version-info `$get_version libtool $version_hdr APR`"
link="\$(LIBTOOL) \$(LTFLAGS) --mode=link \$(COMPILE) \$(LT_LDFLAGS) \$(LT_VERSION) \$(ALL_LDFLAGS) -o \$@"
so_ext='lo'
lib_target='-rpath $(libdir) $(OBJECTS)'
export_lib_target='-rpath \$(libdir) \$(OBJECTS)'
else
lt_compile='$(COMPILE) -o $@ -c $<'
link='$(AR) cr $(TARGET_LIB) $(OBJECTS); $(RANLIB) $(TARGET_LIB)'
so_ext='o'
lib_target=''
export_lib_target=''
fi
case $host in
*-solaris2*)
apr_platform_runtime_link_flag="-R"
;;
*-mingw* | *-cygwin*)
LT_LDFLAGS="$LT_LDFLAGS -no-undefined"
;;
*)
;;
esac
nl='
'
echo "${nl}Check for compiler flags..."
case $host in
*os390)
if test "$ac_test_CFLAGS" != set; then
if test "x$CFLAGS" = "x-g"; then
test "x$silent" != "xyes" && echo " nulling CFLAGS"
CFLAGS=""
else
apr_new_bugger=""
apr_removed=0
for i in $CFLAGS; do
if test "x$i" != "x-g"; then
apr_new_bugger="$apr_new_bugger $i"
else
apr_removed=1
fi
done
if test $apr_removed = "1"; then
test "x$silent" != "xyes" && echo " removed \"-g\" from CFLAGS"
CFLAGS=$apr_new_bugger
fi
fi
fi
;;
esac
# Check whether --enable-debug was given.
if test "${enable_debug+set}" = set; then :
enableval=$enable_debug;
if test "x$CFLAGS" = "x"; then
test "x$silent" != "xyes" && echo " setting CFLAGS to \"-g\""
CFLAGS="-g"
else
apr_addto_bugger="-g"
for i in $apr_addto_bugger; do
apr_addto_duplicate="0"
for j in $CFLAGS; 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 CFLAGS"
CFLAGS="$CFLAGS $i"
fi
done
fi
if test "$GCC" = "yes"; then
if test "x$CFLAGS" = "x"; then
test "x$silent" != "xyes" && echo " setting CFLAGS to \"-Wall\""
CFLAGS="-Wall"
else
apr_addto_bugger="-Wall"
for i in $apr_addto_bugger; do
apr_addto_duplicate="0"
for j in $CFLAGS; 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 CFLAGS"
CFLAGS="$CFLAGS $i"
fi
done
fi
elif test "$AIX_XLC" = "yes"; then
if test "x$CFLAGS" = "x"; then
test "x$silent" != "xyes" && echo " setting CFLAGS to \"-qfullpath\""
CFLAGS="-qfullpath"
else
apr_addto_bugger="-qfullpath"
for i in $apr_addto_bugger; do
apr_addto_duplicate="0"
for j in $CFLAGS; 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 CFLAGS"
CFLAGS="$CFLAGS $i"
fi
done
fi
fi
fi
# Check whether --enable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then :
enableval=$enable_maintainer_mode;
if test "x$CFLAGS" = "x"; then
test "x$silent" != "xyes" && echo " setting CFLAGS to \"-g\""
CFLAGS="-g"
else
apr_addto_bugger="-g"
for i in $apr_addto_bugger; do
apr_addto_duplicate="0"
for j in $CFLAGS; 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 CFLAGS"
CFLAGS="$CFLAGS $i"
fi
done
fi
if test "$GCC" = "yes"; then
if test "x$CFLAGS" = "x"; then
test "x$silent" != "xyes" && echo " setting CFLAGS to \"-Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations\""
CFLAGS="-Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations"
else
apr_addto_bugger="-Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations"
for i in $apr_addto_bugger; do
apr_addto_duplicate="0"
for j in $CFLAGS; 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 CFLAGS"
CFLAGS="$CFLAGS $i"
fi
done
fi
case `($CC --version) 2>/dev/null` in
*clang-900* | *"clang version 5.0.0"*)
if test "x$CFLAGS" = "x"; then
test "x$silent" != "xyes" && echo " setting CFLAGS to \"-Wno-error=strict-prototypes\""
CFLAGS="-Wno-error=strict-prototypes"
else
apr_addto_bugger="-Wno-error=strict-prototypes"
for i in $apr_addto_bugger; do
apr_addto_duplicate="0"
for j in $CFLAGS; 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 CFLAGS"
CFLAGS="$CFLAGS $i"
fi
done
fi
;;
esac
elif test "$AIX_XLC" = "yes"; then
if test "x$CFLAGS" = "x"; then
test "x$silent" != "xyes" && echo " setting CFLAGS to \"-qfullpath -qinitauto=FE -qcheck=all -qinfo=pro\""
CFLAGS="-qfullpath -qinitauto=FE -qcheck=all -qinfo=pro"
else
apr_addto_bugger="-qfullpath -qinitauto=FE -qcheck=all -qinfo=pro"
for i in $apr_addto_bugger; do
apr_addto_duplicate="0"
for j in $CFLAGS; 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 CFLAGS"
CFLAGS="$CFLAGS $i"
fi
done
fi
fi
fi
# Check whether --enable-profile was given.
if test "${enable_profile+set}" = set; then :
enableval=$enable_profile; if test "$GCC" = "yes"; then
if test "x$CFLAGS" = "x"; then
test "x$silent" != "xyes" && echo " setting CFLAGS to \"-pg\""
CFLAGS="-pg"
else
apr_addto_bugger="-pg"
for i in $apr_addto_bugger; do
apr_addto_duplicate="0"
for j in $CFLAGS; 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 CFLAGS"
CFLAGS="$CFLAGS $i"
fi
done
fi
if test "x$CFLAGS" = "x-g"; then
test "x$silent" != "xyes" && echo " nulling CFLAGS"
CFLAGS=""
else
apr_new_bugger=""
apr_removed=0
for i in $CFLAGS; do
if test "x$i" != "x-g"; then
apr_new_bugger="$apr_new_bugger $i"
else
apr_removed=1
fi
done
if test $apr_removed = "1"; then
test "x$silent" != "xyes" && echo " removed \"-g\" from CFLAGS"
CFLAGS=$apr_new_bugger
fi
fi
if test "$host" = "i586-pc-beos"; then
if test "x$CFLAGS" = "x-O2"; then
test "x$silent" != "xyes" && echo " nulling CFLAGS"
CFLAGS=""
else
apr_new_bugger=""
apr_removed=0
for i in $CFLAGS; do
if test "x$i" != "x-O2"; then
apr_new_bugger="$apr_new_bugger $i"
else
apr_removed=1
fi
done
if test $apr_removed = "1"; then
test "x$silent" != "xyes" && echo " removed \"-O2\" from CFLAGS"
CFLAGS=$apr_new_bugger
fi
fi
if test "x$CFLAGS" = "x"; then
test "x$silent" != "xyes" && echo " setting CFLAGS to \"-O1\""
CFLAGS="-O1"
else
apr_addto_bugger="-O1"
for i in $apr_addto_bugger; do
apr_addto_duplicate="0"
for j in $CFLAGS; 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 CFLAGS"
CFLAGS="$CFLAGS $i"
fi
done
fi
if test "x$LDFLAGS" = "x"; then
test "x$silent" != "xyes" && echo " setting LDFLAGS to \"-p\""
LDFLAGS="-p"
else
apr_addto_bugger="-p"
for i in $apr_addto_bugger; do
apr_addto_duplicate="0"
for j in $LDFLAGS; 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 LDFLAGS"
LDFLAGS="$LDFLAGS $i"
fi
done
fi
fi
fi
fi
# Check whether --enable-pool-debug was given.
if test "${enable_pool_debug+set}" = set; then :
enableval=$enable_pool_debug; if test -z "$enableval"; then
if test "x$CPPFLAGS" = "x"; then
test "x$silent" != "xyes" && echo " setting CPPFLAGS to \"-DAPR_POOL_DEBUG=1\""
CPPFLAGS="-DAPR_POOL_DEBUG=1"
else
apr_addto_bugger="-DAPR_POOL_DEBUG=1"
for i in $apr_addto_bugger; do
apr_addto_duplicate="0"
for j in $CPPFLAGS; 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 CPPFLAGS"
CPPFLAGS="$CPPFLAGS $i"
fi
done
fi
elif test ! "$enableval" = "no"; then
apr_pool_debug=1
for i in $enableval
do
flag=0
case $i in
yes)
flag=1
;;
verbose)
flag=2
;;
lifetime)
flag=4
;;
owner)
flag=8
;;
verbose-alloc)
flag=16
;;
all)
apr_pool_debug=31
;;
*)
;;
esac
if test $flag -gt 0; then
apr_pool_debug=`expr '(' $apr_pool_debug - $apr_pool_debug % \
'(' $flag '*' 2 ')' ')' + $flag + $apr_pool_debug % $flag`
fi
done
if test "x$CPPFLAGS" = "x"; then
test "x$silent" != "xyes" && echo " setting CPPFLAGS to \"-DAPR_POOL_DEBUG=$apr_pool_debug\""
CPPFLAGS="-DAPR_POOL_DEBUG=$apr_pool_debug"
else
apr_addto_bugger="-DAPR_POOL_DEBUG=$apr_pool_debug"
for i in $apr_addto_bugger; do
apr_addto_duplicate="0"
for j in $CPPFLAGS; 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 CPPFLAGS"
CPPFLAGS="$CPPFLAGS $i"
fi
done
fi
fi
fi
if test "$host" = "i586-pc-beos"; then
# Check whether --enable-malloc-debug was given.
if test "${enable_malloc_debug+set}" = set; then :
enableval=$enable_malloc_debug;
if test "x$CFLAGS" = "x-O2"; then
test "x$silent" != "xyes" && echo " nulling CFLAGS"
CFLAGS=""
else
apr_new_bugger=""
apr_removed=0
for i in $CFLAGS; do
if test "x$i" != "x-O2"; then
apr_new_bugger="$apr_new_bugger $i"
else
apr_removed=1
fi
done
if test $apr_removed = "1"; then
test "x$silent" != "xyes" && echo " removed \"-O2\" from CFLAGS"
CFLAGS=$apr_new_bugger
fi
fi
if test "x$CPPFLAGS" = "x"; then
test "x$silent" != "xyes" && echo " setting CPPFLAGS to \"-fcheck-memory-usage -D_KERNEL_MODE\""
CPPFLAGS="-fcheck-memory-usage -D_KERNEL_MODE"
else
apr_addto_bugger="-fcheck-memory-usage -D_KERNEL_MODE"
for i in $apr_addto_bugger; do
apr_addto_duplicate="0"
for j in $CPPFLAGS; 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 CPPFLAGS"
CPPFLAGS="$CPPFLAGS $i"
fi
done
fi
fi
fi
# this is the place to put specific options for platform/compiler
# combinations
case "$host:$CC" in
*-hp-hpux*:cc )
if test "x$CFLAGS" = "x"; then
test "x$silent" != "xyes" && echo " setting CFLAGS to \"-Ae +Z\""
CFLAGS="-Ae +Z"
else
apr_addto_bugger="-Ae +Z"
for i in $apr_addto_bugger; do
apr_addto_duplicate="0"
for j in $CFLAGS; 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 CFLAGS"
CFLAGS="$CFLAGS $i"
fi
done
fi
case $host in
ia64-* )
;;
* )
if echo "$CFLAGS " | grep '+DA' >/dev/null; then :
else
if test "x$CFLAGS" = "x"; then
test "x$silent" != "xyes" && echo " setting CFLAGS to \"+DAportable\""
CFLAGS="+DAportable"
else
apr_addto_bugger="+DAportable"
for i in $apr_addto_bugger; do
apr_addto_duplicate="0"
for j in $CFLAGS; 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 CFLAGS"
CFLAGS="$CFLAGS $i"
fi
done
fi
fi
;;
esac
;;
powerpc-*-beos:mwcc* )
test "x$silent" != "xyes" && echo " forcing CPP to \"mwcc -E\""
CPP="mwcc -E"
test "x$silent" != "xyes" && echo " forcing CC to \"mwcc\""
CC="mwcc"
test "x$silent" != "xyes" && echo " forcing AR to \"ar\""
AR="ar"
;;
*-mingw* | *-cygwin*)
if test "$enable_shared" = "yes"; then
if test "x$INTERNAL_CPPFLAGS" = "x"; then
test "x$silent" != "xyes" && echo " setting INTERNAL_CPPFLAGS to \"-DAPR_DECLARE_EXPORT\""
INTERNAL_CPPFLAGS="-DAPR_DECLARE_EXPORT"
else
apr_addto_bugger="-DAPR_DECLARE_EXPORT"
for i in $apr_addto_bugger; do
apr_addto_duplicate="0"
for j in $INTERNAL_CPPFLAGS; 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 INTERNAL_CPPFLAGS"
INTERNAL_CPPFLAGS="$INTERNAL_CPPFLAGS $i"
fi
done
fi
else
if test "x$CPPFLAGS" = "x"; then
test "x$silent" != "xyes" && echo " setting CPPFLAGS to \"-DAPR_DECLARE_STATIC\""
CPPFLAGS="-DAPR_DECLARE_STATIC"
else
apr_addto_bugger="-DAPR_DECLARE_STATIC"
for i in $apr_addto_bugger; do
apr_addto_duplicate="0"
for j in $CPPFLAGS; 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 CPPFLAGS"
CPPFLAGS="$CPPFLAGS $i"
fi
done
fi
fi
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler provides atomic builtins" >&5
$as_echo_n "checking whether the compiler provides atomic builtins... " >&6; }
if ${ap_cv_atomic_builtins+:} false; then :
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then :
ap_cv_atomic_builtins=no
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int main()
{
unsigned long val = 1010, tmp, *mem = &val;
if (__sync_fetch_and_add(&val, 1010) != 1010 || val != 2020)
return 1;
tmp = val;
if (__sync_fetch_and_sub(mem, 1010) != tmp || val != 1010)
return 1;
if (__sync_sub_and_fetch(&val, 1010) != 0 || val != 0)
return 1;
tmp = 3030;
if (__sync_val_compare_and_swap(mem, 0, tmp) != 0 || val != tmp)
return 1;
if (__sync_lock_test_and_set(&val, 4040) != 3030)
return 1;
mem = &tmp;
if (__sync_val_compare_and_swap(&mem, &tmp, &val) != &tmp)
return 1;
__sync_synchronize();
if (mem != &val)
return 1;
return 0;
}
_ACEOF
if ac_fn_c_try_run "$LINENO"; then :
ap_cv_atomic_builtins=yes
else
ap_cv_atomic_builtins=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: $ap_cv_atomic_builtins" >&5
$as_echo "$ap_cv_atomic_builtins" >&6; }
if test "$ap_cv_atomic_builtins" = "yes"; then