2341
2355
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2342
2356
ac_compiler_gnu=$ac_cv_c_compiler_gnu
2359
ac_cpp='$CXXCPP $CPPFLAGS'
2360
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2361
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2362
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2363
if test -n "$ac_tool_prefix"; then
2364
for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2366
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2367
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2368
echo "$as_me:$LINENO: checking for $ac_word" >&5
2369
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2370
if test "${ac_cv_prog_CXX+set}" = set; then
2371
echo $ECHO_N "(cached) $ECHO_C" >&6
2373
if test -n "$CXX"; then
2374
ac_cv_prog_CXX="$CXX" # Let the user override the test.
2376
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2380
test -z "$as_dir" && as_dir=.
2381
for ac_exec_ext in '' $ac_executable_extensions; do
2382
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2383
ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2384
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2393
if test -n "$CXX"; then
2394
echo "$as_me:$LINENO: result: $CXX" >&5
2395
echo "${ECHO_T}$CXX" >&6
2397
echo "$as_me:$LINENO: result: no" >&5
2398
echo "${ECHO_T}no" >&6
2401
test -n "$CXX" && break
2404
if test -z "$CXX"; then
2406
for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2408
# Extract the first word of "$ac_prog", so it can be a program name with args.
2409
set dummy $ac_prog; ac_word=$2
2410
echo "$as_me:$LINENO: checking for $ac_word" >&5
2411
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2412
if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2413
echo $ECHO_N "(cached) $ECHO_C" >&6
2415
if test -n "$ac_ct_CXX"; then
2416
ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2418
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2422
test -z "$as_dir" && as_dir=.
2423
for ac_exec_ext in '' $ac_executable_extensions; do
2424
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2425
ac_cv_prog_ac_ct_CXX="$ac_prog"
2426
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2434
ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2435
if test -n "$ac_ct_CXX"; then
2436
echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
2437
echo "${ECHO_T}$ac_ct_CXX" >&6
2439
echo "$as_me:$LINENO: result: no" >&5
2440
echo "${ECHO_T}no" >&6
2443
test -n "$ac_ct_CXX" && break
2445
test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2451
# Provide some information about the compiler.
2452
echo "$as_me:$LINENO:" \
2453
"checking for C++ compiler version" >&5
2454
ac_compiler=`set X $ac_compile; echo $2`
2455
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2456
(eval $ac_compiler --version </dev/null >&5) 2>&5
2458
echo "$as_me:$LINENO: \$? = $ac_status" >&5
2459
(exit $ac_status); }
2460
{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2461
(eval $ac_compiler -v </dev/null >&5) 2>&5
2463
echo "$as_me:$LINENO: \$? = $ac_status" >&5
2464
(exit $ac_status); }
2465
{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2466
(eval $ac_compiler -V </dev/null >&5) 2>&5
2468
echo "$as_me:$LINENO: \$? = $ac_status" >&5
2469
(exit $ac_status); }
2471
echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
2472
echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2473
if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2474
echo $ECHO_N "(cached) $ECHO_C" >&6
2476
cat >conftest.$ac_ext <<_ACEOF
2479
cat confdefs.h >>conftest.$ac_ext
2480
cat >>conftest.$ac_ext <<_ACEOF
2481
/* end confdefs.h. */
2494
rm -f conftest.$ac_objext
2495
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2496
(eval $ac_compile) 2>conftest.er1
2498
grep -v '^ *+' conftest.er1 >conftest.err
2500
cat conftest.err >&5
2501
echo "$as_me:$LINENO: \$? = $ac_status" >&5
2502
(exit $ac_status); } &&
2503
{ ac_try='test -z "$ac_cxx_werror_flag"
2504
|| test ! -s conftest.err'
2505
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2508
echo "$as_me:$LINENO: \$? = $ac_status" >&5
2509
(exit $ac_status); }; } &&
2510
{ ac_try='test -s conftest.$ac_objext'
2511
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2514
echo "$as_me:$LINENO: \$? = $ac_status" >&5
2515
(exit $ac_status); }; }; then
2518
echo "$as_me: failed program was:" >&5
2519
sed 's/^/| /' conftest.$ac_ext >&5
2523
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2524
ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2527
echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
2528
echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2529
GXX=`test $ac_compiler_gnu = yes && echo yes`
2530
ac_test_CXXFLAGS=${CXXFLAGS+set}
2531
ac_save_CXXFLAGS=$CXXFLAGS
2533
echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
2534
echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2535
if test "${ac_cv_prog_cxx_g+set}" = set; then
2536
echo $ECHO_N "(cached) $ECHO_C" >&6
2538
cat >conftest.$ac_ext <<_ACEOF
2541
cat confdefs.h >>conftest.$ac_ext
2542
cat >>conftest.$ac_ext <<_ACEOF
2543
/* end confdefs.h. */
2553
rm -f conftest.$ac_objext
2554
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2555
(eval $ac_compile) 2>conftest.er1
2557
grep -v '^ *+' conftest.er1 >conftest.err
2559
cat conftest.err >&5
2560
echo "$as_me:$LINENO: \$? = $ac_status" >&5
2561
(exit $ac_status); } &&
2562
{ ac_try='test -z "$ac_cxx_werror_flag"
2563
|| test ! -s conftest.err'
2564
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2567
echo "$as_me:$LINENO: \$? = $ac_status" >&5
2568
(exit $ac_status); }; } &&
2569
{ ac_try='test -s conftest.$ac_objext'
2570
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2573
echo "$as_me:$LINENO: \$? = $ac_status" >&5
2574
(exit $ac_status); }; }; then
2575
ac_cv_prog_cxx_g=yes
2577
echo "$as_me: failed program was:" >&5
2578
sed 's/^/| /' conftest.$ac_ext >&5
2582
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2584
echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
2585
echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2586
if test "$ac_test_CXXFLAGS" = set; then
2587
CXXFLAGS=$ac_save_CXXFLAGS
2588
elif test $ac_cv_prog_cxx_g = yes; then
2589
if test "$GXX" = yes; then
2595
if test "$GXX" = yes; then
2601
for ac_declaration in \
2603
'extern "C" void std::exit (int) throw (); using std::exit;' \
2604
'extern "C" void std::exit (int); using std::exit;' \
2605
'extern "C" void exit (int) throw ();' \
2606
'extern "C" void exit (int);' \
2609
cat >conftest.$ac_ext <<_ACEOF
2612
cat confdefs.h >>conftest.$ac_ext
2613
cat >>conftest.$ac_ext <<_ACEOF
2614
/* end confdefs.h. */
2625
rm -f conftest.$ac_objext
2626
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2627
(eval $ac_compile) 2>conftest.er1
2629
grep -v '^ *+' conftest.er1 >conftest.err
2631
cat conftest.err >&5
2632
echo "$as_me:$LINENO: \$? = $ac_status" >&5
2633
(exit $ac_status); } &&
2634
{ ac_try='test -z "$ac_cxx_werror_flag"
2635
|| test ! -s conftest.err'
2636
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2639
echo "$as_me:$LINENO: \$? = $ac_status" >&5
2640
(exit $ac_status); }; } &&
2641
{ ac_try='test -s conftest.$ac_objext'
2642
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2645
echo "$as_me:$LINENO: \$? = $ac_status" >&5
2646
(exit $ac_status); }; }; then
2649
echo "$as_me: failed program was:" >&5
2650
sed 's/^/| /' conftest.$ac_ext >&5
2654
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2655
cat >conftest.$ac_ext <<_ACEOF
2658
cat confdefs.h >>conftest.$ac_ext
2659
cat >>conftest.$ac_ext <<_ACEOF
2660
/* end confdefs.h. */
2670
rm -f conftest.$ac_objext
2671
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2672
(eval $ac_compile) 2>conftest.er1
2674
grep -v '^ *+' conftest.er1 >conftest.err
2676
cat conftest.err >&5
2677
echo "$as_me:$LINENO: \$? = $ac_status" >&5
2678
(exit $ac_status); } &&
2679
{ ac_try='test -z "$ac_cxx_werror_flag"
2680
|| test ! -s conftest.err'
2681
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2684
echo "$as_me:$LINENO: \$? = $ac_status" >&5
2685
(exit $ac_status); }; } &&
2686
{ ac_try='test -s conftest.$ac_objext'
2687
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2690
echo "$as_me:$LINENO: \$? = $ac_status" >&5
2691
(exit $ac_status); }; }; then
2694
echo "$as_me: failed program was:" >&5
2695
sed 's/^/| /' conftest.$ac_ext >&5
2698
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2701
if test -n "$ac_declaration"; then
2702
echo '#ifdef __cplusplus' >>confdefs.h
2703
echo $ac_declaration >>confdefs.h
2704
echo '#endif' >>confdefs.h
2708
ac_cpp='$CPP $CPPFLAGS'
2709
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2710
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2711
ac_compiler_gnu=$ac_cv_c_compiler_gnu
2346
2715
ac_cpp='$CPP $CPPFLAGS'
2931
3322
{ echo "$as_me:$LINENO: skipping pedantic warnings on Linux" >&5
2932
3323
echo "$as_me: skipping pedantic warnings on Linux" >&6;}
2934
CFLAGS="$CFLAGS -pedantic"
3325
WARN_CFLAGS="$WARN_CFLAGS -pedantic"
3327
if test "$ac_cv_cxx_compiler_gnu" = yes; then
3328
if test "x$krb5_ac_warn_cxxflags_set" = xset ; then
3329
{ echo "$as_me:$LINENO: not adding extra g++ warnings because WARN_CXXFLAGS was set" >&5
3330
echo "$as_me: not adding extra g++ warnings because WARN_CXXFLAGS was set" >&6;}
3332
{ echo "$as_me:$LINENO: adding extra warning flags for g++" >&5
3333
echo "$as_me: adding extra warning flags for g++" >&6;}
3334
WARN_CXXFLAGS="$WARN_CXXFLAGS $extra_gcc_warn_opts"
3337
# Currently, G++ does not support -Wno-format-zero-length.
3338
cachevar=`echo "krb5_cv_cc_flag_-Wno-format-zero-length" | sed s/[^a-zA-Z0-9_]/_/g`
3339
echo "$as_me:$LINENO: checking if C compiler supports -Wno-format-zero-length" >&5
3340
echo $ECHO_N "checking if C compiler supports -Wno-format-zero-length... $ECHO_C" >&6
3341
if eval "test \"\${$cachevar+set}\" = set"; then
3342
echo $ECHO_N "(cached) $ECHO_C" >&6
3344
# first try without, then with
3345
cat >conftest.$ac_ext <<_ACEOF
3348
cat confdefs.h >>conftest.$ac_ext
3349
cat >>conftest.$ac_ext <<_ACEOF
3350
/* end confdefs.h. */
3360
rm -f conftest.$ac_objext
3361
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3362
(eval $ac_compile) 2>conftest.er1
3364
grep -v '^ *+' conftest.er1 >conftest.err
3366
cat conftest.err >&5
3367
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3368
(exit $ac_status); } &&
3369
{ ac_try='test -z "$ac_c_werror_flag"
3370
|| test ! -s conftest.err'
3371
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3374
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3375
(exit $ac_status); }; } &&
3376
{ ac_try='test -s conftest.$ac_objext'
3377
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3380
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3381
(exit $ac_status); }; }; then
3382
old_cflags="$CFLAGS"
3383
CFLAGS="$CFLAGS -Wno-format-zero-length"
3384
cat >conftest.$ac_ext <<_ACEOF
3387
cat confdefs.h >>conftest.$ac_ext
3388
cat >>conftest.$ac_ext <<_ACEOF
3389
/* end confdefs.h. */
3399
rm -f conftest.$ac_objext
3400
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3401
(eval $ac_compile) 2>conftest.er1
3403
grep -v '^ *+' conftest.er1 >conftest.err
3405
cat conftest.err >&5
3406
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3407
(exit $ac_status); } &&
3408
{ ac_try='test -z "$ac_c_werror_flag"
3409
|| test ! -s conftest.err'
3410
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3413
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3414
(exit $ac_status); }; } &&
3415
{ ac_try='test -s conftest.$ac_objext'
3416
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3419
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3420
(exit $ac_status); }; }; then
3423
echo "$as_me: failed program was:" >&5
3424
sed 's/^/| /' conftest.$ac_ext >&5
3428
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3429
CFLAGS="$old_cflags"
3431
echo "$as_me: failed program was:" >&5
3432
sed 's/^/| /' conftest.$ac_ext >&5
3434
{ { echo "$as_me:$LINENO: error: compiling simple test program with $CFLAGS failed" >&5
3435
echo "$as_me: error: compiling simple test program with $CFLAGS failed" >&2;}
3436
{ (exit 1); exit 1; }; }
3438
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3440
echo "$as_me:$LINENO: result: `eval echo '${'$cachevar'}'`" >&5
3441
echo "${ECHO_T}`eval echo '${'$cachevar'}'`" >&6
3442
if eval test '"${'$cachevar'}"' = yes; then
3443
WARN_CFLAGS="$WARN_CFLAGS -Wno-format-zero-length"
3445
eval flag_supported='${'$cachevar'}'
3447
# Other flags here may not be supported on some versions of
3448
# gcc that people want to use.
3449
for flag in overflow strict-overflow missing-format-attribute missing-prototypes return-type missing-braces parentheses switch unused-function unused-label unused-variable unused-value unknown-pragmas sign-compare newline-eof ; do
3450
cachevar=`echo "krb5_cv_cc_flag_-W$flag" | sed s/[^a-zA-Z0-9_]/_/g`
3451
echo "$as_me:$LINENO: checking if C compiler supports -W$flag" >&5
3452
echo $ECHO_N "checking if C compiler supports -W$flag... $ECHO_C" >&6
3453
if eval "test \"\${$cachevar+set}\" = set"; then
3454
echo $ECHO_N "(cached) $ECHO_C" >&6
3456
# first try without, then with
3457
cat >conftest.$ac_ext <<_ACEOF
3460
cat confdefs.h >>conftest.$ac_ext
3461
cat >>conftest.$ac_ext <<_ACEOF
3462
/* end confdefs.h. */
3472
rm -f conftest.$ac_objext
3473
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3474
(eval $ac_compile) 2>conftest.er1
3476
grep -v '^ *+' conftest.er1 >conftest.err
3478
cat conftest.err >&5
3479
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3480
(exit $ac_status); } &&
3481
{ ac_try='test -z "$ac_c_werror_flag"
3482
|| test ! -s conftest.err'
3483
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3486
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3487
(exit $ac_status); }; } &&
3488
{ ac_try='test -s conftest.$ac_objext'
3489
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3492
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3493
(exit $ac_status); }; }; then
3494
old_cflags="$CFLAGS"
3495
CFLAGS="$CFLAGS -W$flag"
3496
cat >conftest.$ac_ext <<_ACEOF
3499
cat confdefs.h >>conftest.$ac_ext
3500
cat >>conftest.$ac_ext <<_ACEOF
3501
/* end confdefs.h. */
3511
rm -f conftest.$ac_objext
3512
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3513
(eval $ac_compile) 2>conftest.er1
3515
grep -v '^ *+' conftest.er1 >conftest.err
3517
cat conftest.err >&5
3518
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3519
(exit $ac_status); } &&
3520
{ ac_try='test -z "$ac_c_werror_flag"
3521
|| test ! -s conftest.err'
3522
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3525
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3526
(exit $ac_status); }; } &&
3527
{ ac_try='test -s conftest.$ac_objext'
3528
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3531
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3532
(exit $ac_status); }; }; then
3535
echo "$as_me: failed program was:" >&5
3536
sed 's/^/| /' conftest.$ac_ext >&5
3540
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3541
CFLAGS="$old_cflags"
3543
echo "$as_me: failed program was:" >&5
3544
sed 's/^/| /' conftest.$ac_ext >&5
3546
{ { echo "$as_me:$LINENO: error: compiling simple test program with $CFLAGS failed" >&5
3547
echo "$as_me: error: compiling simple test program with $CFLAGS failed" >&2;}
3548
{ (exit 1); exit 1; }; }
3550
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3552
echo "$as_me:$LINENO: result: `eval echo '${'$cachevar'}'`" >&5
3553
echo "${ECHO_T}`eval echo '${'$cachevar'}'`" >&6
3554
if eval test '"${'$cachevar'}"' = yes; then
3555
WARN_CFLAGS="$WARN_CFLAGS -W$flag"
3557
eval flag_supported='${'$cachevar'}'
3560
# old-style-definition? generates many, many warnings
3562
# Warnings that we'd like to turn into errors on versions of gcc
3563
# that support promoting only specific warnings to errors, but
3564
# we'll take as warnings on older compilers. (If such a warning
3565
# is added after the -Werror=foo feature, you can just put
3566
# error=foo in the above list, and skip the test for the
3567
# warning-only form.) At least in some versions, -Werror= doesn't
3568
# seem to make the conditions actual errors, but still issues
3569
# warnings; I guess we'll take what we can get.
3571
# We're currently targeting C89+, not C99, so disallow some
3573
for flag in declaration-after-statement variadic-macros ; do
3574
cachevar=`echo "krb5_cv_cc_flag_-Werror=$flag" | sed s/[^a-zA-Z0-9_]/_/g`
3575
echo "$as_me:$LINENO: checking if C compiler supports -Werror=$flag" >&5
3576
echo $ECHO_N "checking if C compiler supports -Werror=$flag... $ECHO_C" >&6
3577
if eval "test \"\${$cachevar+set}\" = set"; then
3578
echo $ECHO_N "(cached) $ECHO_C" >&6
3580
# first try without, then with
3581
cat >conftest.$ac_ext <<_ACEOF
3584
cat confdefs.h >>conftest.$ac_ext
3585
cat >>conftest.$ac_ext <<_ACEOF
3586
/* end confdefs.h. */
3596
rm -f conftest.$ac_objext
3597
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3598
(eval $ac_compile) 2>conftest.er1
3600
grep -v '^ *+' conftest.er1 >conftest.err
3602
cat conftest.err >&5
3603
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3604
(exit $ac_status); } &&
3605
{ ac_try='test -z "$ac_c_werror_flag"
3606
|| test ! -s conftest.err'
3607
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3610
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3611
(exit $ac_status); }; } &&
3612
{ ac_try='test -s conftest.$ac_objext'
3613
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3616
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3617
(exit $ac_status); }; }; then
3618
old_cflags="$CFLAGS"
3619
CFLAGS="$CFLAGS -Werror=$flag"
3620
cat >conftest.$ac_ext <<_ACEOF
3623
cat confdefs.h >>conftest.$ac_ext
3624
cat >>conftest.$ac_ext <<_ACEOF
3625
/* end confdefs.h. */
3635
rm -f conftest.$ac_objext
3636
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3637
(eval $ac_compile) 2>conftest.er1
3639
grep -v '^ *+' conftest.er1 >conftest.err
3641
cat conftest.err >&5
3642
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3643
(exit $ac_status); } &&
3644
{ ac_try='test -z "$ac_c_werror_flag"
3645
|| test ! -s conftest.err'
3646
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3649
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3650
(exit $ac_status); }; } &&
3651
{ ac_try='test -s conftest.$ac_objext'
3652
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3655
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3656
(exit $ac_status); }; }; then
3659
echo "$as_me: failed program was:" >&5
3660
sed 's/^/| /' conftest.$ac_ext >&5
3664
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3665
CFLAGS="$old_cflags"
3667
echo "$as_me: failed program was:" >&5
3668
sed 's/^/| /' conftest.$ac_ext >&5
3670
{ { echo "$as_me:$LINENO: error: compiling simple test program with $CFLAGS failed" >&5
3671
echo "$as_me: error: compiling simple test program with $CFLAGS failed" >&2;}
3672
{ (exit 1); exit 1; }; }
3674
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3676
echo "$as_me:$LINENO: result: `eval echo '${'$cachevar'}'`" >&5
3677
echo "${ECHO_T}`eval echo '${'$cachevar'}'`" >&6
3678
if eval test '"${'$cachevar'}"' = yes; then
3679
WARN_CFLAGS="$WARN_CFLAGS -Werror=$flag"
3681
eval flag_supported='${'$cachevar'}'
3683
if test "$flag_supported" = no; then
3684
cachevar=`echo "krb5_cv_cc_flag_-W$flag" | sed s/[^a-zA-Z0-9_]/_/g`
3685
echo "$as_me:$LINENO: checking if C compiler supports -W$flag" >&5
3686
echo $ECHO_N "checking if C compiler supports -W$flag... $ECHO_C" >&6
3687
if eval "test \"\${$cachevar+set}\" = set"; then
3688
echo $ECHO_N "(cached) $ECHO_C" >&6
3690
# first try without, then with
3691
cat >conftest.$ac_ext <<_ACEOF
3694
cat confdefs.h >>conftest.$ac_ext
3695
cat >>conftest.$ac_ext <<_ACEOF
3696
/* end confdefs.h. */
3706
rm -f conftest.$ac_objext
3707
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3708
(eval $ac_compile) 2>conftest.er1
3710
grep -v '^ *+' conftest.er1 >conftest.err
3712
cat conftest.err >&5
3713
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3714
(exit $ac_status); } &&
3715
{ ac_try='test -z "$ac_c_werror_flag"
3716
|| test ! -s conftest.err'
3717
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3720
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3721
(exit $ac_status); }; } &&
3722
{ ac_try='test -s conftest.$ac_objext'
3723
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3726
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3727
(exit $ac_status); }; }; then
3728
old_cflags="$CFLAGS"
3729
CFLAGS="$CFLAGS -W$flag"
3730
cat >conftest.$ac_ext <<_ACEOF
3733
cat confdefs.h >>conftest.$ac_ext
3734
cat >>conftest.$ac_ext <<_ACEOF
3735
/* end confdefs.h. */
3745
rm -f conftest.$ac_objext
3746
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
3747
(eval $ac_compile) 2>conftest.er1
3749
grep -v '^ *+' conftest.er1 >conftest.err
3751
cat conftest.err >&5
3752
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3753
(exit $ac_status); } &&
3754
{ ac_try='test -z "$ac_c_werror_flag"
3755
|| test ! -s conftest.err'
3756
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3759
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3760
(exit $ac_status); }; } &&
3761
{ ac_try='test -s conftest.$ac_objext'
3762
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3765
echo "$as_me:$LINENO: \$? = $ac_status" >&5
3766
(exit $ac_status); }; }; then
3769
echo "$as_me: failed program was:" >&5
3770
sed 's/^/| /' conftest.$ac_ext >&5
3774
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3775
CFLAGS="$old_cflags"
3777
echo "$as_me: failed program was:" >&5
3778
sed 's/^/| /' conftest.$ac_ext >&5
3780
{ { echo "$as_me:$LINENO: error: compiling simple test program with $CFLAGS failed" >&5
3781
echo "$as_me: error: compiling simple test program with $CFLAGS failed" >&2;}
3782
{ (exit 1); exit 1; }; }
3784
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
3786
echo "$as_me:$LINENO: result: `eval echo '${'$cachevar'}'`" >&5
3787
echo "${ECHO_T}`eval echo '${'$cachevar'}'`" >&6
3788
if eval test '"${'$cachevar'}"' = yes; then
3789
WARN_CFLAGS="$WARN_CFLAGS -W$flag"
3791
eval flag_supported='${'$cachevar'}'
3795
# missing-prototypes? maybe someday
2937
3798
if test "`uname -s`" = Darwin ; then
2938
3799
# Someday this should be a feature test.
8796
# Check whether to build static libraries.
8797
9629
# Check whether --enable-static or --disable-static was given.
8798
9630
if test "${enable_static+set}" = set; then
8799
9631
enableval="$enable_static"
8802
enable_static=$default_static
8805
if test "$enable_static" = yes; then
9632
if test "$enableval" != no; then
8806
9633
{ { echo "$as_me:$LINENO: error: Sorry, static libraries do not work in this release." >&5
8807
9634
echo "$as_me: error: Sorry, static libraries do not work in this release." >&2;}
8808
9635
{ (exit 1); exit 1; }; }
8811
if test "$enable_static" = no && test "$krb5_force_static" != yes; then
8812
{ echo "$as_me:$LINENO: disabling static libraries" >&5
8813
echo "$as_me: disabling static libraries" >&6;}
8818
LIBLIST='lib$(LIBBASE)$(STLIBEXT)'
8819
LIBLINKS='$(TOPLIBD)/lib$(LIBBASE)$(STLIBEXT)'
8821
LIBINSTLIST=install-static
8823
# CFLAGS="$CFLAGS -D_KDB5_STATIC_LINK"
8826
# Check whether to build shared libraries.
8827
9638
# Check whether --enable-shared or --disable-shared was given.
8828
9639
if test "${enable_shared+set}" = set; then
8829
9640
enableval="$enable_shared"
8832
enable_shared=$default_shared
8835
if test "$enable_shared" != yes; then
9641
if test "$enableval" != yes; then
8836
9642
{ { echo "$as_me:$LINENO: error: Sorry, this release builds only shared libraries, cannot disable them." >&5
8837
9643
echo "$as_me: error: Sorry, this release builds only shared libraries, cannot disable them." >&2;}
8838
9644
{ (exit 1); exit 1; }; }
8841
if test "$enable_shared" = yes; then
8844
{ echo "$as_me:$LINENO: WARNING: shared libraries not supported on this architecture" >&5
8845
echo "$as_me: WARNING: shared libraries not supported on this architecture" >&2;}
8847
CC_LINK="$CC_LINK_STATIC"
8850
# set this now because some logic below may reset SHLIBEXT
8852
if test "$krb5_force_static" = "yes"; then
8853
echo "$as_me:$LINENO: result: Forcing static libraries." >&5
9647
# Check whether --enable-rpath or --disable-rpath was given.
9648
if test "${enable_rpath+set}" = set; then
9649
enableval="$enable_rpath"
9650
enable_rpath=$enableval
9655
if test "x$enable_rpath" != xyes ; then
9656
# Unset the rpath flag values set by shlib.conf
9662
if test "$SHLIBEXT" = ".so-nobuild"; then
9663
{ { echo "$as_me:$LINENO: error: Shared libraries are not yet supported on this platform." >&5
9664
echo "$as_me: error: Shared libraries are not yet supported on this platform." >&2;}
9665
{ (exit 1); exit 1; }; }
9670
if test "$krb5_force_static" = "yes"; then
9671
LIBLIST='lib$(LIBBASE)$(STLIBEXT)'
9672
LIBLINKS='$(TOPLIBD)/lib$(LIBBASE)$(STLIBEXT)'
9674
# This used to be install-static, but now we only follow this
9675
# path for internal libraries we don't want installed, not for
9676
# configure-time requests for installed static libraries.
9678
# CFLAGS="$CFLAGS -D_KDB5_STATIC_LINK"
9680
echo "$as_me:$LINENO: result: Forcing static libraries." >&5
8854
9681
echo "${ECHO_T}Forcing static libraries." >&6
8855
# avoid duplicate rules generation for AIX and such
8856
SHLIBEXT=.so-nobuild
8857
SHLIBVEXT=.so.v-nobuild
8858
SHLIBSEXT=.so.s-nobuild
8860
{ echo "$as_me:$LINENO: enabling shared libraries" >&5
8861
echo "$as_me: enabling shared libraries" >&6;}
8862
# Clear some stuff in case of AIX, etc.
8863
if test "$STLIBEXT" = "$SHLIBEXT" ; then
8870
LIBLIST="$LIBLIST "'lib$(LIBBASE)$(SHLIBEXT)'
8871
LIBLINKS="$LIBLINKS "'$(TOPLIBD)/lib$(LIBBASE)$(SHLIBEXT) $(TOPLIBD)/lib$(LIBBASE)$(SHLIBVEXT)'
8872
case "$SHLIBSEXT" in
8874
LIBINSTLIST="$LIBINSTLIST install-shared"
8877
LIBLIST="$LIBLIST "'lib$(LIBBASE)$(SHLIBSEXT)'
8878
LIBLINKS="$LIBLINKS "'$(TOPLIBD)/lib$(LIBBASE)$(SHLIBSEXT)'
8879
LIBINSTLIST="$LIBINSTLIST install-shlib-soname"
8882
OBJLISTS="$OBJLISTS OBJS.SH"
8884
CC_LINK="$CC_LINK_SHARED"
8889
CC_LINK="$CC_LINK_STATIC"
9682
# avoid duplicate rules generation for AIX and such
8890
9683
SHLIBEXT=.so-nobuild
8891
9684
SHLIBVEXT=.so.v-nobuild
8892
9685
SHLIBSEXT=.so.s-nobuild
8895
if test "$build_dynobj" = yes; then
8896
OBJLISTS=`echo $OBJLISTS | sed -e s/OBJS.ST//g -e s/OBJS.SH//g`
8897
OBJLISTS="$OBJLISTS OBJS.SH"
9687
{ echo "$as_me:$LINENO: using shared libraries" >&5
9688
echo "$as_me: using shared libraries" >&6;}
9690
# Clear some stuff in case of AIX, etc.
9691
if test "$STLIBEXT" = "$SHLIBEXT" ; then
9694
case "$SHLIBSEXT" in
9696
SHLIB_HAVE_MINOR_VERS=no
9697
LIBLIST='lib$(LIBBASE)$(SHLIBEXT)'
9698
LIBLINKS='$(TOPLIBD)/lib$(LIBBASE)$(SHLIBEXT) $(TOPLIBD)/lib$(LIBBASE)$(SHLIBVEXT)'
9699
LIBINSTLIST="install-shared"
9702
SHLIB_HAVE_MINOR_VERS=yes
9703
LIBLIST='lib$(LIBBASE)$(SHLIBEXT) lib$(LIBBASE)$(SHLIBSEXT)'
9704
LIBLINKS='$(TOPLIBD)/lib$(LIBBASE)$(SHLIBEXT) $(TOPLIBD)/lib$(LIBBASE)$(SHLIBVEXT) $(TOPLIBD)/lib$(LIBBASE)$(SHLIBSEXT)'
9705
LIBINSTLIST="install-shlib-soname"
9710
CC_LINK="$CC_LINK_SHARED"
9711
CXX_LINK="$CXX_LINK_SHARED"
8900
9714
if test -z "$LIBLIST"; then
8901
9715
{ { echo "$as_me:$LINENO: error: must enable one of shared or static libraries" >&5