~ubuntu-branches/debian/wheezy/apache2/wheezy

« back to all changes in this revision

Viewing changes to srclib/apr-util/configure

  • Committer: Package Import Robot
  • Author(s): Stefan Fritsch, Stefan Fritsch, Arno Töll
  • Date: 2012-02-01 21:49:04 UTC
  • mfrom: (0.13.15)
  • Revision ID: package-import@ubuntu.com-20120201214904-nlchebp6wu7z55jw
Tags: 2.2.22-1
[ Stefan Fritsch ]
* New upstream release, urgency medium due to security fixes:
  - Fix CVE-2012-0021: mod_log_config: DoS with '%{cookiename}C' log format
  - Fix CVE-2012-0031: Unprivileged child process could cause the parent to
    crash at shutdown
  - Fix CVE-2012-0053: Exposure of "httpOnly" cookies in code 400 error
    message.
* Move httxt2dbm to apache2-utils
* Adjust debian/control to point to new git repository.

[ Arno Töll ]
* Fix "typo in /etc/apache2/apache2.conf" (Closes: #653801)

Show diffs side-by-side

added added

removed removed

Lines of Context:
659
659
ldap_ssl_h
660
660
lber_h
661
661
ldap_h
 
662
LDADD_crypto_nss
 
663
apu_have_nss
 
664
PKG_CONFIG
 
665
apu_have_crypto
 
666
LDADD_crypto_openssl
 
667
apu_have_openssl
662
668
EGREP
663
669
GREP
664
670
CPP
741
747
enable_layout
742
748
with_apr
743
749
with_apr_iconv
 
750
with_crypto
 
751
with_openssl
 
752
with_nss
744
753
with_lber
745
754
with_ldap_include
746
755
with_ldap_lib
1384
1393
  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1385
1394
  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1386
1395
  --enable-layout=LAYOUT
1387
 
  --disable-util-dso      disable DSO build of modular components (dbd, dbm,
1388
 
                          ldap)
 
1396
  --disable-util-dso      disable DSO build of modular components (crypto,
 
1397
                          dbd, dbm, ldap)
1389
1398
 
1390
1399
Optional Packages:
1391
1400
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1393
1402
  --with-apr=PATH         prefix for installed APR or the full path to
1394
1403
                             apr-config
1395
1404
  --with-apr-iconv=DIR    relative path to apr-iconv source
 
1405
  --with-crypto           enable crypto support
 
1406
  --with-openssl=DIR      specify location of OpenSSL
 
1407
  --with-nss=DIR          specify location of NSS
1396
1408
  --with-lber=library     lber library to use
1397
1409
  --with-ldap-include=path  path to ldap include files with trailing slash
1398
1410
  --with-ldap-lib=path    path to ldap lib file
1796
1808
 
1797
1809
} # ac_fn_c_check_header_compile
1798
1810
 
 
1811
# ac_fn_c_check_decl LINENO SYMBOL VAR
 
1812
# ------------------------------------
 
1813
# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
 
1814
ac_fn_c_check_decl ()
 
1815
{
 
1816
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
 
1817
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
 
1818
$as_echo_n "checking whether $2 is declared... " >&6; }
 
1819
if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
 
1820
  $as_echo_n "(cached) " >&6
 
1821
else
 
1822
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
1823
/* end confdefs.h.  */
 
1824
$4
 
1825
int
 
1826
main ()
 
1827
{
 
1828
#ifndef $2
 
1829
  (void) $2;
 
1830
#endif
 
1831
 
 
1832
  ;
 
1833
  return 0;
 
1834
}
 
1835
_ACEOF
 
1836
if ac_fn_c_try_compile "$LINENO"; then :
 
1837
  eval "$3=yes"
 
1838
else
 
1839
  eval "$3=no"
 
1840
fi
 
1841
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
1842
fi
 
1843
eval ac_res=\$$3
 
1844
               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
 
1845
$as_echo "$ac_res" >&6; }
 
1846
  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
 
1847
 
 
1848
} # ac_fn_c_check_decl
 
1849
 
1799
1850
# ac_fn_c_check_func LINENO FUNC VAR
1800
1851
# ----------------------------------
1801
1852
# Tests whether FUNC exists, setting the cache variable VAR accordingly
2419
2470
 
2420
2471
 
2421
2472
 
 
2473
 
 
2474
 
 
2475
 
 
2476
 
 
2477
 
 
2478
 
 
2479
 
 
2480
 
2422
2481
  rm -f config.nice
2423
2482
  cat >config.nice<<EOF
2424
2483
#! /bin/sh
4606
4665
 
4607
4666
 
4608
4667
 
 
4668
  apu_have_crypto=0
 
4669
 
 
4670
  old_libs="$LIBS"
 
4671
  old_cppflags="$CPPFLAGS"
 
4672
  old_ldflags="$LDFLAGS"
 
4673
 
 
4674
 
 
4675
# Check whether --with-crypto was given.
 
4676
if test "${with_crypto+set}" = set; then :
 
4677
  withval=$with_crypto;
 
4678
    if test "$withval" = "yes"; then
 
4679
 
 
4680
  apu_have_openssl=0
 
4681
  openssl_have_headers=0
 
4682
  openssl_have_libs=0
 
4683
 
 
4684
  old_libs="$LIBS"
 
4685
  old_cppflags="$CPPFLAGS"
 
4686
  old_ldflags="$LDFLAGS"
 
4687
 
 
4688
 
 
4689
# Check whether --with-openssl was given.
 
4690
if test "${with_openssl+set}" = set; then :
 
4691
  withval=$with_openssl;
 
4692
    if test "$withval" = "yes"; then
 
4693
      for ac_header in openssl/x509.h
 
4694
do :
 
4695
  ac_fn_c_check_header_mongrel "$LINENO" "openssl/x509.h" "ac_cv_header_openssl_x509_h" "$ac_includes_default"
 
4696
if test "x$ac_cv_header_openssl_x509_h" = x""yes; then :
 
4697
  cat >>confdefs.h <<_ACEOF
 
4698
#define HAVE_OPENSSL_X509_H 1
 
4699
_ACEOF
 
4700
 openssl_have_headers=1
 
4701
fi
 
4702
 
 
4703
done
 
4704
 
 
4705
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BN_init in -lcrypto" >&5
 
4706
$as_echo_n "checking for BN_init in -lcrypto... " >&6; }
 
4707
if test "${ac_cv_lib_crypto_BN_init+set}" = set; then :
 
4708
  $as_echo_n "(cached) " >&6
 
4709
else
 
4710
  ac_check_lib_save_LIBS=$LIBS
 
4711
LIBS="-lcrypto  $LIBS"
 
4712
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
4713
/* end confdefs.h.  */
 
4714
 
 
4715
/* Override any GCC internal prototype to avoid an error.
 
4716
   Use char because int might match the return type of a GCC
 
4717
   builtin and then its argument prototype would still apply.  */
 
4718
#ifdef __cplusplus
 
4719
extern "C"
 
4720
#endif
 
4721
char BN_init ();
 
4722
int
 
4723
main ()
 
4724
{
 
4725
return BN_init ();
 
4726
  ;
 
4727
  return 0;
 
4728
}
 
4729
_ACEOF
 
4730
if ac_fn_c_try_link "$LINENO"; then :
 
4731
  ac_cv_lib_crypto_BN_init=yes
 
4732
else
 
4733
  ac_cv_lib_crypto_BN_init=no
 
4734
fi
 
4735
rm -f core conftest.err conftest.$ac_objext \
 
4736
    conftest$ac_exeext conftest.$ac_ext
 
4737
LIBS=$ac_check_lib_save_LIBS
 
4738
fi
 
4739
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_BN_init" >&5
 
4740
$as_echo "$ac_cv_lib_crypto_BN_init" >&6; }
 
4741
if test "x$ac_cv_lib_crypto_BN_init" = x""yes; then :
 
4742
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_accept in -lssl" >&5
 
4743
$as_echo_n "checking for SSL_accept in -lssl... " >&6; }
 
4744
if test "${ac_cv_lib_ssl_SSL_accept+set}" = set; then :
 
4745
  $as_echo_n "(cached) " >&6
 
4746
else
 
4747
  ac_check_lib_save_LIBS=$LIBS
 
4748
LIBS="-lssl -lcrypto $LIBS"
 
4749
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
4750
/* end confdefs.h.  */
 
4751
 
 
4752
/* Override any GCC internal prototype to avoid an error.
 
4753
   Use char because int might match the return type of a GCC
 
4754
   builtin and then its argument prototype would still apply.  */
 
4755
#ifdef __cplusplus
 
4756
extern "C"
 
4757
#endif
 
4758
char SSL_accept ();
 
4759
int
 
4760
main ()
 
4761
{
 
4762
return SSL_accept ();
 
4763
  ;
 
4764
  return 0;
 
4765
}
 
4766
_ACEOF
 
4767
if ac_fn_c_try_link "$LINENO"; then :
 
4768
  ac_cv_lib_ssl_SSL_accept=yes
 
4769
else
 
4770
  ac_cv_lib_ssl_SSL_accept=no
 
4771
fi
 
4772
rm -f core conftest.err conftest.$ac_objext \
 
4773
    conftest$ac_exeext conftest.$ac_ext
 
4774
LIBS=$ac_check_lib_save_LIBS
 
4775
fi
 
4776
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_accept" >&5
 
4777
$as_echo "$ac_cv_lib_ssl_SSL_accept" >&6; }
 
4778
if test "x$ac_cv_lib_ssl_SSL_accept" = x""yes; then :
 
4779
  openssl_have_libs=1
 
4780
fi
 
4781
 
 
4782
fi
 
4783
 
 
4784
      if test "$openssl_have_headers" != "0" && test "$openssl_have_libs" != "0"; then
 
4785
        apu_have_openssl=1
 
4786
      fi
 
4787
    elif test "$withval" = "no"; then
 
4788
      apu_have_openssl=0
 
4789
    else
 
4790
 
 
4791
      openssl_CPPFLAGS="-I$withval/include"
 
4792
      openssl_LDFLAGS="-L$withval/lib "
 
4793
 
 
4794
 
 
4795
  if test "x$CPPFLAGS" = "x"; then
 
4796
    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$openssl_CPPFLAGS\""
 
4797
    CPPFLAGS="$openssl_CPPFLAGS"
 
4798
  else
 
4799
    apr_addto_bugger="$openssl_CPPFLAGS"
 
4800
    for i in $apr_addto_bugger; do
 
4801
      apr_addto_duplicate="0"
 
4802
      for j in $CPPFLAGS; do
 
4803
        if test "x$i" = "x$j"; then
 
4804
          apr_addto_duplicate="1"
 
4805
          break
 
4806
        fi
 
4807
      done
 
4808
      if test $apr_addto_duplicate = "0"; then
 
4809
        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
 
4810
        CPPFLAGS="$CPPFLAGS $i"
 
4811
      fi
 
4812
    done
 
4813
  fi
 
4814
 
 
4815
 
 
4816
  if test "x$LDFLAGS" = "x"; then
 
4817
    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$openssl_LDFLAGS\""
 
4818
    LDFLAGS="$openssl_LDFLAGS"
 
4819
  else
 
4820
    apr_addto_bugger="$openssl_LDFLAGS"
 
4821
    for i in $apr_addto_bugger; do
 
4822
      apr_addto_duplicate="0"
 
4823
      for j in $LDFLAGS; do
 
4824
        if test "x$i" = "x$j"; then
 
4825
          apr_addto_duplicate="1"
 
4826
          break
 
4827
        fi
 
4828
      done
 
4829
      if test $apr_addto_duplicate = "0"; then
 
4830
        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
 
4831
        LDFLAGS="$LDFLAGS $i"
 
4832
      fi
 
4833
    done
 
4834
  fi
 
4835
 
 
4836
 
 
4837
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl in $withval" >&5
 
4838
$as_echo "$as_me: checking for openssl in $withval" >&6;}
 
4839
      for ac_header in openssl/x509.h
 
4840
do :
 
4841
  ac_fn_c_check_header_mongrel "$LINENO" "openssl/x509.h" "ac_cv_header_openssl_x509_h" "$ac_includes_default"
 
4842
if test "x$ac_cv_header_openssl_x509_h" = x""yes; then :
 
4843
  cat >>confdefs.h <<_ACEOF
 
4844
#define HAVE_OPENSSL_X509_H 1
 
4845
_ACEOF
 
4846
 openssl_have_headers=1
 
4847
fi
 
4848
 
 
4849
done
 
4850
 
 
4851
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BN_init in -lcrypto" >&5
 
4852
$as_echo_n "checking for BN_init in -lcrypto... " >&6; }
 
4853
if test "${ac_cv_lib_crypto_BN_init+set}" = set; then :
 
4854
  $as_echo_n "(cached) " >&6
 
4855
else
 
4856
  ac_check_lib_save_LIBS=$LIBS
 
4857
LIBS="-lcrypto  $LIBS"
 
4858
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
4859
/* end confdefs.h.  */
 
4860
 
 
4861
/* Override any GCC internal prototype to avoid an error.
 
4862
   Use char because int might match the return type of a GCC
 
4863
   builtin and then its argument prototype would still apply.  */
 
4864
#ifdef __cplusplus
 
4865
extern "C"
 
4866
#endif
 
4867
char BN_init ();
 
4868
int
 
4869
main ()
 
4870
{
 
4871
return BN_init ();
 
4872
  ;
 
4873
  return 0;
 
4874
}
 
4875
_ACEOF
 
4876
if ac_fn_c_try_link "$LINENO"; then :
 
4877
  ac_cv_lib_crypto_BN_init=yes
 
4878
else
 
4879
  ac_cv_lib_crypto_BN_init=no
 
4880
fi
 
4881
rm -f core conftest.err conftest.$ac_objext \
 
4882
    conftest$ac_exeext conftest.$ac_ext
 
4883
LIBS=$ac_check_lib_save_LIBS
 
4884
fi
 
4885
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_BN_init" >&5
 
4886
$as_echo "$ac_cv_lib_crypto_BN_init" >&6; }
 
4887
if test "x$ac_cv_lib_crypto_BN_init" = x""yes; then :
 
4888
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_accept in -lssl" >&5
 
4889
$as_echo_n "checking for SSL_accept in -lssl... " >&6; }
 
4890
if test "${ac_cv_lib_ssl_SSL_accept+set}" = set; then :
 
4891
  $as_echo_n "(cached) " >&6
 
4892
else
 
4893
  ac_check_lib_save_LIBS=$LIBS
 
4894
LIBS="-lssl -lcrypto $LIBS"
 
4895
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
4896
/* end confdefs.h.  */
 
4897
 
 
4898
/* Override any GCC internal prototype to avoid an error.
 
4899
   Use char because int might match the return type of a GCC
 
4900
   builtin and then its argument prototype would still apply.  */
 
4901
#ifdef __cplusplus
 
4902
extern "C"
 
4903
#endif
 
4904
char SSL_accept ();
 
4905
int
 
4906
main ()
 
4907
{
 
4908
return SSL_accept ();
 
4909
  ;
 
4910
  return 0;
 
4911
}
 
4912
_ACEOF
 
4913
if ac_fn_c_try_link "$LINENO"; then :
 
4914
  ac_cv_lib_ssl_SSL_accept=yes
 
4915
else
 
4916
  ac_cv_lib_ssl_SSL_accept=no
 
4917
fi
 
4918
rm -f core conftest.err conftest.$ac_objext \
 
4919
    conftest$ac_exeext conftest.$ac_ext
 
4920
LIBS=$ac_check_lib_save_LIBS
 
4921
fi
 
4922
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_accept" >&5
 
4923
$as_echo "$ac_cv_lib_ssl_SSL_accept" >&6; }
 
4924
if test "x$ac_cv_lib_ssl_SSL_accept" = x""yes; then :
 
4925
  openssl_have_libs=1
 
4926
fi
 
4927
 
 
4928
fi
 
4929
 
 
4930
      if test "$openssl_have_headers" != "0" && test "$openssl_have_libs" != "0"; then
 
4931
        apu_have_openssl=1
 
4932
 
 
4933
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
4934
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$withval/lib\""
 
4935
    APRUTIL_LDFLAGS="-L$withval/lib"
 
4936
  else
 
4937
    apr_addto_bugger="-L$withval/lib"
 
4938
    for i in $apr_addto_bugger; do
 
4939
      apr_addto_duplicate="0"
 
4940
      for j in $APRUTIL_LDFLAGS; do
 
4941
        if test "x$i" = "x$j"; then
 
4942
          apr_addto_duplicate="1"
 
4943
          break
 
4944
        fi
 
4945
      done
 
4946
      if test $apr_addto_duplicate = "0"; then
 
4947
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
4948
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
4949
      fi
 
4950
    done
 
4951
  fi
 
4952
 
 
4953
 
 
4954
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
4955
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$withval/include\""
 
4956
    APRUTIL_INCLUDES="-I$withval/include"
 
4957
  else
 
4958
    apr_addto_bugger="-I$withval/include"
 
4959
    for i in $apr_addto_bugger; do
 
4960
      apr_addto_duplicate="0"
 
4961
      for j in $APRUTIL_INCLUDES; do
 
4962
        if test "x$i" = "x$j"; then
 
4963
          apr_addto_duplicate="1"
 
4964
          break
 
4965
        fi
 
4966
      done
 
4967
      if test $apr_addto_duplicate = "0"; then
 
4968
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
4969
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
4970
      fi
 
4971
    done
 
4972
  fi
 
4973
 
 
4974
      fi
 
4975
 
 
4976
      if test "$apu_have_openssl" != "1"; then
 
4977
        for ac_header in openssl/x509.h
 
4978
do :
 
4979
  ac_fn_c_check_header_mongrel "$LINENO" "openssl/x509.h" "ac_cv_header_openssl_x509_h" "$ac_includes_default"
 
4980
if test "x$ac_cv_header_openssl_x509_h" = x""yes; then :
 
4981
  cat >>confdefs.h <<_ACEOF
 
4982
#define HAVE_OPENSSL_X509_H 1
 
4983
_ACEOF
 
4984
 openssl_have_headers=1
 
4985
fi
 
4986
 
 
4987
done
 
4988
 
 
4989
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BN_init in -lcrypto" >&5
 
4990
$as_echo_n "checking for BN_init in -lcrypto... " >&6; }
 
4991
if test "${ac_cv_lib_crypto_BN_init+set}" = set; then :
 
4992
  $as_echo_n "(cached) " >&6
 
4993
else
 
4994
  ac_check_lib_save_LIBS=$LIBS
 
4995
LIBS="-lcrypto  $LIBS"
 
4996
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
4997
/* end confdefs.h.  */
 
4998
 
 
4999
/* Override any GCC internal prototype to avoid an error.
 
5000
   Use char because int might match the return type of a GCC
 
5001
   builtin and then its argument prototype would still apply.  */
 
5002
#ifdef __cplusplus
 
5003
extern "C"
 
5004
#endif
 
5005
char BN_init ();
 
5006
int
 
5007
main ()
 
5008
{
 
5009
return BN_init ();
 
5010
  ;
 
5011
  return 0;
 
5012
}
 
5013
_ACEOF
 
5014
if ac_fn_c_try_link "$LINENO"; then :
 
5015
  ac_cv_lib_crypto_BN_init=yes
 
5016
else
 
5017
  ac_cv_lib_crypto_BN_init=no
 
5018
fi
 
5019
rm -f core conftest.err conftest.$ac_objext \
 
5020
    conftest$ac_exeext conftest.$ac_ext
 
5021
LIBS=$ac_check_lib_save_LIBS
 
5022
fi
 
5023
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_BN_init" >&5
 
5024
$as_echo "$ac_cv_lib_crypto_BN_init" >&6; }
 
5025
if test "x$ac_cv_lib_crypto_BN_init" = x""yes; then :
 
5026
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_accept in -lssl" >&5
 
5027
$as_echo_n "checking for SSL_accept in -lssl... " >&6; }
 
5028
if test "${ac_cv_lib_ssl_SSL_accept+set}" = set; then :
 
5029
  $as_echo_n "(cached) " >&6
 
5030
else
 
5031
  ac_check_lib_save_LIBS=$LIBS
 
5032
LIBS="-lssl -lcrypto $LIBS"
 
5033
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
5034
/* end confdefs.h.  */
 
5035
 
 
5036
/* Override any GCC internal prototype to avoid an error.
 
5037
   Use char because int might match the return type of a GCC
 
5038
   builtin and then its argument prototype would still apply.  */
 
5039
#ifdef __cplusplus
 
5040
extern "C"
 
5041
#endif
 
5042
char SSL_accept ();
 
5043
int
 
5044
main ()
 
5045
{
 
5046
return SSL_accept ();
 
5047
  ;
 
5048
  return 0;
 
5049
}
 
5050
_ACEOF
 
5051
if ac_fn_c_try_link "$LINENO"; then :
 
5052
  ac_cv_lib_ssl_SSL_accept=yes
 
5053
else
 
5054
  ac_cv_lib_ssl_SSL_accept=no
 
5055
fi
 
5056
rm -f core conftest.err conftest.$ac_objext \
 
5057
    conftest$ac_exeext conftest.$ac_ext
 
5058
LIBS=$ac_check_lib_save_LIBS
 
5059
fi
 
5060
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_accept" >&5
 
5061
$as_echo "$ac_cv_lib_ssl_SSL_accept" >&6; }
 
5062
if test "x$ac_cv_lib_ssl_SSL_accept" = x""yes; then :
 
5063
  openssl_have_libs=1
 
5064
fi
 
5065
 
 
5066
fi
 
5067
 
 
5068
        if test "$openssl_have_headers" != "0" && test "$openssl_have_libs" != "0"; then
 
5069
          apu_have_openssl=1
 
5070
 
 
5071
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
5072
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$withval/lib\""
 
5073
    APRUTIL_LDFLAGS="-L$withval/lib"
 
5074
  else
 
5075
    apr_addto_bugger="-L$withval/lib"
 
5076
    for i in $apr_addto_bugger; do
 
5077
      apr_addto_duplicate="0"
 
5078
      for j in $APRUTIL_LDFLAGS; do
 
5079
        if test "x$i" = "x$j"; then
 
5080
          apr_addto_duplicate="1"
 
5081
          break
 
5082
        fi
 
5083
      done
 
5084
      if test $apr_addto_duplicate = "0"; then
 
5085
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
5086
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
5087
      fi
 
5088
    done
 
5089
  fi
 
5090
 
 
5091
 
 
5092
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
5093
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$withval/include\""
 
5094
    APRUTIL_INCLUDES="-I$withval/include"
 
5095
  else
 
5096
    apr_addto_bugger="-I$withval/include"
 
5097
    for i in $apr_addto_bugger; do
 
5098
      apr_addto_duplicate="0"
 
5099
      for j in $APRUTIL_INCLUDES; do
 
5100
        if test "x$i" = "x$j"; then
 
5101
          apr_addto_duplicate="1"
 
5102
          break
 
5103
        fi
 
5104
      done
 
5105
      if test $apr_addto_duplicate = "0"; then
 
5106
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
5107
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
5108
      fi
 
5109
    done
 
5110
  fi
 
5111
 
 
5112
        fi
 
5113
      fi
 
5114
 
 
5115
      ac_fn_c_check_decl "$LINENO" "EVP_PKEY_CTX_new" "ac_cv_have_decl_EVP_PKEY_CTX_new" "#include <openssl/evp.h>
 
5116
"
 
5117
if test "x$ac_cv_have_decl_EVP_PKEY_CTX_new" = x""yes; then :
 
5118
  ac_have_decl=1
 
5119
else
 
5120
  ac_have_decl=0
 
5121
fi
 
5122
 
 
5123
cat >>confdefs.h <<_ACEOF
 
5124
#define HAVE_DECL_EVP_PKEY_CTX_NEW $ac_have_decl
 
5125
_ACEOF
 
5126
 
 
5127
 
 
5128
    fi
 
5129
 
 
5130
else
 
5131
 
 
5132
    apu_have_openssl=0
 
5133
 
 
5134
fi
 
5135
 
 
5136
 
 
5137
 
 
5138
 
 
5139
      if test "$apu_have_openssl" = "1"; then
 
5140
    LDADD_crypto_openssl="$openssl_LDFLAGS -lssl -lcrypto"
 
5141
    apu_have_crypto=1
 
5142
 
 
5143
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for const input buffers in OpenSSL" >&5
 
5144
$as_echo_n "checking for const input buffers in OpenSSL... " >&6; }
 
5145
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
5146
/* end confdefs.h.  */
 
5147
#include <openssl/rsa.h>
 
5148
int
 
5149
main ()
 
5150
{
 
5151
 const unsigned char * buf;
 
5152
          unsigned char * outbuf;
 
5153
          RSA rsa;
 
5154
 
 
5155
                RSA_private_decrypt(1,
 
5156
                                                        buf,
 
5157
                                                        outbuf,
 
5158
                                                        &rsa,
 
5159
                                                        RSA_PKCS1_PADDING);
 
5160
 
 
5161
 
 
5162
  ;
 
5163
  return 0;
 
5164
}
 
5165
_ACEOF
 
5166
if ac_fn_c_try_compile "$LINENO"; then :
 
5167
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 
5168
$as_echo "yes" >&6; }
 
5169
 
 
5170
$as_echo "#define CRYPTO_OPENSSL_CONST_BUFFERS 1" >>confdefs.h
 
5171
 
 
5172
else
 
5173
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 
5174
$as_echo "no" >&6; }
 
5175
fi
 
5176
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
5177
 
 
5178
  fi
 
5179
 
 
5180
 
 
5181
 
 
5182
  LIBS="$old_libs"
 
5183
  CPPFLAGS="$old_cppflags"
 
5184
  LDFLAGS="$old_ldflags"
 
5185
 
 
5186
 
 
5187
  apu_have_nss=0
 
5188
  nss_have_headers=0
 
5189
  nss_have_libs=0
 
5190
 
 
5191
  old_libs="$LIBS"
 
5192
  old_cppflags="$CPPFLAGS"
 
5193
  old_ldflags="$LDFLAGS"
 
5194
 
 
5195
 
 
5196
# Check whether --with-nss was given.
 
5197
if test "${with_nss+set}" = set; then :
 
5198
  withval=$with_nss;
 
5199
 
 
5200
    if test "$withval" = "yes"; then
 
5201
      if test -n "$ac_tool_prefix"; then
 
5202
  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
 
5203
set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
 
5204
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 
5205
$as_echo_n "checking for $ac_word... " >&6; }
 
5206
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
 
5207
  $as_echo_n "(cached) " >&6
 
5208
else
 
5209
  case $PKG_CONFIG in
 
5210
  [\\/]* | ?:[\\/]*)
 
5211
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
 
5212
  ;;
 
5213
  *)
 
5214
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
5215
for as_dir in $PATH
 
5216
do
 
5217
  IFS=$as_save_IFS
 
5218
  test -z "$as_dir" && as_dir=.
 
5219
    for ac_exec_ext in '' $ac_executable_extensions; do
 
5220
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
5221
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
 
5222
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
 
5223
    break 2
 
5224
  fi
 
5225
done
 
5226
  done
 
5227
IFS=$as_save_IFS
 
5228
 
 
5229
  ;;
 
5230
esac
 
5231
fi
 
5232
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
 
5233
if test -n "$PKG_CONFIG"; then
 
5234
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
 
5235
$as_echo "$PKG_CONFIG" >&6; }
 
5236
else
 
5237
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 
5238
$as_echo "no" >&6; }
 
5239
fi
 
5240
 
 
5241
 
 
5242
fi
 
5243
if test -z "$ac_cv_path_PKG_CONFIG"; then
 
5244
  ac_pt_PKG_CONFIG=$PKG_CONFIG
 
5245
  # Extract the first word of "pkg-config", so it can be a program name with args.
 
5246
set dummy pkg-config; ac_word=$2
 
5247
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 
5248
$as_echo_n "checking for $ac_word... " >&6; }
 
5249
if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
 
5250
  $as_echo_n "(cached) " >&6
 
5251
else
 
5252
  case $ac_pt_PKG_CONFIG in
 
5253
  [\\/]* | ?:[\\/]*)
 
5254
  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
 
5255
  ;;
 
5256
  *)
 
5257
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
5258
for as_dir in $PATH
 
5259
do
 
5260
  IFS=$as_save_IFS
 
5261
  test -z "$as_dir" && as_dir=.
 
5262
    for ac_exec_ext in '' $ac_executable_extensions; do
 
5263
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
5264
    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
 
5265
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
 
5266
    break 2
 
5267
  fi
 
5268
done
 
5269
  done
 
5270
IFS=$as_save_IFS
 
5271
 
 
5272
  ;;
 
5273
esac
 
5274
fi
 
5275
ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
 
5276
if test -n "$ac_pt_PKG_CONFIG"; then
 
5277
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
 
5278
$as_echo "$ac_pt_PKG_CONFIG" >&6; }
 
5279
else
 
5280
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 
5281
$as_echo "no" >&6; }
 
5282
fi
 
5283
 
 
5284
  if test "x$ac_pt_PKG_CONFIG" = x; then
 
5285
    PKG_CONFIG=""
 
5286
  else
 
5287
    case $cross_compiling:$ac_tool_warned in
 
5288
yes:)
 
5289
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
 
5290
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 
5291
ac_tool_warned=yes ;;
 
5292
esac
 
5293
    PKG_CONFIG=$ac_pt_PKG_CONFIG
 
5294
  fi
 
5295
else
 
5296
  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
 
5297
fi
 
5298
 
 
5299
      if test -n "$PKG_CONFIG"; then
 
5300
        nss_CPPFLAGS=`$PKG_CONFIG --cflags-only-I nss`
 
5301
        nss_LDFLAGS=`$PKG_CONFIG --libs nss`
 
5302
 
 
5303
  if test "x$CPPFLAGS" = "x"; then
 
5304
    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$nss_CPPFLAGS\""
 
5305
    CPPFLAGS="$nss_CPPFLAGS"
 
5306
  else
 
5307
    apr_addto_bugger="$nss_CPPFLAGS"
 
5308
    for i in $apr_addto_bugger; do
 
5309
      apr_addto_duplicate="0"
 
5310
      for j in $CPPFLAGS; do
 
5311
        if test "x$i" = "x$j"; then
 
5312
          apr_addto_duplicate="1"
 
5313
          break
 
5314
        fi
 
5315
      done
 
5316
      if test $apr_addto_duplicate = "0"; then
 
5317
        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
 
5318
        CPPFLAGS="$CPPFLAGS $i"
 
5319
      fi
 
5320
    done
 
5321
  fi
 
5322
 
 
5323
 
 
5324
  if test "x$LDFLAGS" = "x"; then
 
5325
    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$nss_LDFLAGS\""
 
5326
    LDFLAGS="$nss_LDFLAGS"
 
5327
  else
 
5328
    apr_addto_bugger="$nss_LDFLAGS"
 
5329
    for i in $apr_addto_bugger; do
 
5330
      apr_addto_duplicate="0"
 
5331
      for j in $LDFLAGS; do
 
5332
        if test "x$i" = "x$j"; then
 
5333
          apr_addto_duplicate="1"
 
5334
          break
 
5335
        fi
 
5336
      done
 
5337
      if test $apr_addto_duplicate = "0"; then
 
5338
        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
 
5339
        LDFLAGS="$LDFLAGS $i"
 
5340
      fi
 
5341
    done
 
5342
  fi
 
5343
 
 
5344
      fi
 
5345
      for ac_header in prerror.h nss/nss.h nss.h nss/pk11pub.h pk11pub.h
 
5346
do :
 
5347
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 
5348
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
 
5349
eval as_val=\$$as_ac_Header
 
5350
   if test "x$as_val" = x""yes; then :
 
5351
  cat >>confdefs.h <<_ACEOF
 
5352
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 
5353
_ACEOF
 
5354
 nss_have_headers=1
 
5355
fi
 
5356
 
 
5357
done
 
5358
 
 
5359
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PR_Initialize in -lnspr4" >&5
 
5360
$as_echo_n "checking for PR_Initialize in -lnspr4... " >&6; }
 
5361
if test "${ac_cv_lib_nspr4_PR_Initialize+set}" = set; then :
 
5362
  $as_echo_n "(cached) " >&6
 
5363
else
 
5364
  ac_check_lib_save_LIBS=$LIBS
 
5365
LIBS="-lnspr4  $LIBS"
 
5366
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
5367
/* end confdefs.h.  */
 
5368
 
 
5369
/* Override any GCC internal prototype to avoid an error.
 
5370
   Use char because int might match the return type of a GCC
 
5371
   builtin and then its argument prototype would still apply.  */
 
5372
#ifdef __cplusplus
 
5373
extern "C"
 
5374
#endif
 
5375
char PR_Initialize ();
 
5376
int
 
5377
main ()
 
5378
{
 
5379
return PR_Initialize ();
 
5380
  ;
 
5381
  return 0;
 
5382
}
 
5383
_ACEOF
 
5384
if ac_fn_c_try_link "$LINENO"; then :
 
5385
  ac_cv_lib_nspr4_PR_Initialize=yes
 
5386
else
 
5387
  ac_cv_lib_nspr4_PR_Initialize=no
 
5388
fi
 
5389
rm -f core conftest.err conftest.$ac_objext \
 
5390
    conftest$ac_exeext conftest.$ac_ext
 
5391
LIBS=$ac_check_lib_save_LIBS
 
5392
fi
 
5393
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nspr4_PR_Initialize" >&5
 
5394
$as_echo "$ac_cv_lib_nspr4_PR_Initialize" >&6; }
 
5395
if test "x$ac_cv_lib_nspr4_PR_Initialize" = x""yes; then :
 
5396
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PK11_CreatePBEV2AlgorithmID in -lnss3" >&5
 
5397
$as_echo_n "checking for PK11_CreatePBEV2AlgorithmID in -lnss3... " >&6; }
 
5398
if test "${ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID+set}" = set; then :
 
5399
  $as_echo_n "(cached) " >&6
 
5400
else
 
5401
  ac_check_lib_save_LIBS=$LIBS
 
5402
LIBS="-lnss3 -lnspr4 $LIBS"
 
5403
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
5404
/* end confdefs.h.  */
 
5405
 
 
5406
/* Override any GCC internal prototype to avoid an error.
 
5407
   Use char because int might match the return type of a GCC
 
5408
   builtin and then its argument prototype would still apply.  */
 
5409
#ifdef __cplusplus
 
5410
extern "C"
 
5411
#endif
 
5412
char PK11_CreatePBEV2AlgorithmID ();
 
5413
int
 
5414
main ()
 
5415
{
 
5416
return PK11_CreatePBEV2AlgorithmID ();
 
5417
  ;
 
5418
  return 0;
 
5419
}
 
5420
_ACEOF
 
5421
if ac_fn_c_try_link "$LINENO"; then :
 
5422
  ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID=yes
 
5423
else
 
5424
  ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID=no
 
5425
fi
 
5426
rm -f core conftest.err conftest.$ac_objext \
 
5427
    conftest$ac_exeext conftest.$ac_ext
 
5428
LIBS=$ac_check_lib_save_LIBS
 
5429
fi
 
5430
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID" >&5
 
5431
$as_echo "$ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID" >&6; }
 
5432
if test "x$ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID" = x""yes; then :
 
5433
  nss_have_libs=1
 
5434
fi
 
5435
 
 
5436
fi
 
5437
 
 
5438
      if test "$nss_have_headers" != "0" && test "$nss_have_libs" != "0"; then
 
5439
        apu_have_nss=1
 
5440
      fi
 
5441
    elif test "$withval" = "no"; then
 
5442
      apu_have_nss=0
 
5443
    elif test "x$withval" != "x"; then
 
5444
 
 
5445
      nss_CPPFLAGS="-I$withval/include/nss -I$withval/include/nss3 -I$withval/include/nspr -I$withval/include/nspr4 -I$withval/include -I$withval/../public"
 
5446
      nss_LDFLAGS="-L$withval/lib "
 
5447
 
 
5448
 
 
5449
  if test "x$CPPFLAGS" = "x"; then
 
5450
    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$nss_CPPFLAGS\""
 
5451
    CPPFLAGS="$nss_CPPFLAGS"
 
5452
  else
 
5453
    apr_addto_bugger="$nss_CPPFLAGS"
 
5454
    for i in $apr_addto_bugger; do
 
5455
      apr_addto_duplicate="0"
 
5456
      for j in $CPPFLAGS; do
 
5457
        if test "x$i" = "x$j"; then
 
5458
          apr_addto_duplicate="1"
 
5459
          break
 
5460
        fi
 
5461
      done
 
5462
      if test $apr_addto_duplicate = "0"; then
 
5463
        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
 
5464
        CPPFLAGS="$CPPFLAGS $i"
 
5465
      fi
 
5466
    done
 
5467
  fi
 
5468
 
 
5469
 
 
5470
  if test "x$LDFLAGS" = "x"; then
 
5471
    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$nss_LDFLAGS\""
 
5472
    LDFLAGS="$nss_LDFLAGS"
 
5473
  else
 
5474
    apr_addto_bugger="$nss_LDFLAGS"
 
5475
    for i in $apr_addto_bugger; do
 
5476
      apr_addto_duplicate="0"
 
5477
      for j in $LDFLAGS; do
 
5478
        if test "x$i" = "x$j"; then
 
5479
          apr_addto_duplicate="1"
 
5480
          break
 
5481
        fi
 
5482
      done
 
5483
      if test $apr_addto_duplicate = "0"; then
 
5484
        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
 
5485
        LDFLAGS="$LDFLAGS $i"
 
5486
      fi
 
5487
    done
 
5488
  fi
 
5489
 
 
5490
 
 
5491
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nss in $withval" >&5
 
5492
$as_echo "$as_me: checking for nss in $withval" >&6;}
 
5493
      for ac_header in prerror.h nss/nss.h nss.h nss/pk11pub.h pk11pub.h
 
5494
do :
 
5495
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 
5496
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
 
5497
eval as_val=\$$as_ac_Header
 
5498
   if test "x$as_val" = x""yes; then :
 
5499
  cat >>confdefs.h <<_ACEOF
 
5500
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 
5501
_ACEOF
 
5502
 nss_have_headers=1
 
5503
fi
 
5504
 
 
5505
done
 
5506
 
 
5507
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PR_Initialize in -lnspr4" >&5
 
5508
$as_echo_n "checking for PR_Initialize in -lnspr4... " >&6; }
 
5509
if test "${ac_cv_lib_nspr4_PR_Initialize+set}" = set; then :
 
5510
  $as_echo_n "(cached) " >&6
 
5511
else
 
5512
  ac_check_lib_save_LIBS=$LIBS
 
5513
LIBS="-lnspr4  $LIBS"
 
5514
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
5515
/* end confdefs.h.  */
 
5516
 
 
5517
/* Override any GCC internal prototype to avoid an error.
 
5518
   Use char because int might match the return type of a GCC
 
5519
   builtin and then its argument prototype would still apply.  */
 
5520
#ifdef __cplusplus
 
5521
extern "C"
 
5522
#endif
 
5523
char PR_Initialize ();
 
5524
int
 
5525
main ()
 
5526
{
 
5527
return PR_Initialize ();
 
5528
  ;
 
5529
  return 0;
 
5530
}
 
5531
_ACEOF
 
5532
if ac_fn_c_try_link "$LINENO"; then :
 
5533
  ac_cv_lib_nspr4_PR_Initialize=yes
 
5534
else
 
5535
  ac_cv_lib_nspr4_PR_Initialize=no
 
5536
fi
 
5537
rm -f core conftest.err conftest.$ac_objext \
 
5538
    conftest$ac_exeext conftest.$ac_ext
 
5539
LIBS=$ac_check_lib_save_LIBS
 
5540
fi
 
5541
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nspr4_PR_Initialize" >&5
 
5542
$as_echo "$ac_cv_lib_nspr4_PR_Initialize" >&6; }
 
5543
if test "x$ac_cv_lib_nspr4_PR_Initialize" = x""yes; then :
 
5544
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PK11_CreatePBEV2AlgorithmID in -lnss3" >&5
 
5545
$as_echo_n "checking for PK11_CreatePBEV2AlgorithmID in -lnss3... " >&6; }
 
5546
if test "${ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID+set}" = set; then :
 
5547
  $as_echo_n "(cached) " >&6
 
5548
else
 
5549
  ac_check_lib_save_LIBS=$LIBS
 
5550
LIBS="-lnss3 -lnspr4 $LIBS"
 
5551
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
5552
/* end confdefs.h.  */
 
5553
 
 
5554
/* Override any GCC internal prototype to avoid an error.
 
5555
   Use char because int might match the return type of a GCC
 
5556
   builtin and then its argument prototype would still apply.  */
 
5557
#ifdef __cplusplus
 
5558
extern "C"
 
5559
#endif
 
5560
char PK11_CreatePBEV2AlgorithmID ();
 
5561
int
 
5562
main ()
 
5563
{
 
5564
return PK11_CreatePBEV2AlgorithmID ();
 
5565
  ;
 
5566
  return 0;
 
5567
}
 
5568
_ACEOF
 
5569
if ac_fn_c_try_link "$LINENO"; then :
 
5570
  ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID=yes
 
5571
else
 
5572
  ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID=no
 
5573
fi
 
5574
rm -f core conftest.err conftest.$ac_objext \
 
5575
    conftest$ac_exeext conftest.$ac_ext
 
5576
LIBS=$ac_check_lib_save_LIBS
 
5577
fi
 
5578
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID" >&5
 
5579
$as_echo "$ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID" >&6; }
 
5580
if test "x$ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID" = x""yes; then :
 
5581
  nss_have_libs=1
 
5582
fi
 
5583
 
 
5584
fi
 
5585
 
 
5586
      if test "$nss_have_headers" != "0" && test "$nss_have_libs" != "0"; then
 
5587
        apu_have_nss=1
 
5588
      fi
 
5589
 
 
5590
    fi
 
5591
    if test "$apu_have_nss" != "0"; then
 
5592
 
 
5593
  if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
 
5594
    test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"$nss_CPPFLAGS\""
 
5595
    APRUTIL_PRIV_INCLUDES="$nss_CPPFLAGS"
 
5596
  else
 
5597
    apr_addto_bugger="$nss_CPPFLAGS"
 
5598
    for i in $apr_addto_bugger; do
 
5599
      apr_addto_duplicate="0"
 
5600
      for j in $APRUTIL_PRIV_INCLUDES; do
 
5601
        if test "x$i" = "x$j"; then
 
5602
          apr_addto_duplicate="1"
 
5603
          break
 
5604
        fi
 
5605
      done
 
5606
      if test $apr_addto_duplicate = "0"; then
 
5607
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
 
5608
        APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
 
5609
      fi
 
5610
    done
 
5611
  fi
 
5612
 
 
5613
    fi
 
5614
 
 
5615
else
 
5616
 
 
5617
    apu_have_nss=0
 
5618
 
 
5619
fi
 
5620
 
 
5621
 
 
5622
 
 
5623
 
 
5624
      if test "$apu_have_nss" = "1"; then
 
5625
    LDADD_crypto_nss="$nss_LDFLAGS -lnspr4 -lnss3"
 
5626
    apu_have_crypto=1
 
5627
  fi
 
5628
 
 
5629
 
 
5630
 
 
5631
  LIBS="$old_libs"
 
5632
  CPPFLAGS="$old_cppflags"
 
5633
  LDFLAGS="$old_ldflags"
 
5634
 
 
5635
          fi
 
5636
 
 
5637
else
 
5638
 
 
5639
      apu_have_crypto=0
 
5640
 
 
5641
fi
 
5642
 
 
5643
 
 
5644
 
 
5645
 
 
5646
 
 
5647
 
 
5648
  apu_have_openssl=0
 
5649
  openssl_have_headers=0
 
5650
  openssl_have_libs=0
 
5651
 
 
5652
  old_libs="$LIBS"
 
5653
  old_cppflags="$CPPFLAGS"
 
5654
  old_ldflags="$LDFLAGS"
 
5655
 
 
5656
 
 
5657
# Check whether --with-openssl was given.
 
5658
if test "${with_openssl+set}" = set; then :
 
5659
  withval=$with_openssl;
 
5660
    if test "$withval" = "yes"; then
 
5661
      for ac_header in openssl/x509.h
 
5662
do :
 
5663
  ac_fn_c_check_header_mongrel "$LINENO" "openssl/x509.h" "ac_cv_header_openssl_x509_h" "$ac_includes_default"
 
5664
if test "x$ac_cv_header_openssl_x509_h" = x""yes; then :
 
5665
  cat >>confdefs.h <<_ACEOF
 
5666
#define HAVE_OPENSSL_X509_H 1
 
5667
_ACEOF
 
5668
 openssl_have_headers=1
 
5669
fi
 
5670
 
 
5671
done
 
5672
 
 
5673
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BN_init in -lcrypto" >&5
 
5674
$as_echo_n "checking for BN_init in -lcrypto... " >&6; }
 
5675
if test "${ac_cv_lib_crypto_BN_init+set}" = set; then :
 
5676
  $as_echo_n "(cached) " >&6
 
5677
else
 
5678
  ac_check_lib_save_LIBS=$LIBS
 
5679
LIBS="-lcrypto  $LIBS"
 
5680
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
5681
/* end confdefs.h.  */
 
5682
 
 
5683
/* Override any GCC internal prototype to avoid an error.
 
5684
   Use char because int might match the return type of a GCC
 
5685
   builtin and then its argument prototype would still apply.  */
 
5686
#ifdef __cplusplus
 
5687
extern "C"
 
5688
#endif
 
5689
char BN_init ();
 
5690
int
 
5691
main ()
 
5692
{
 
5693
return BN_init ();
 
5694
  ;
 
5695
  return 0;
 
5696
}
 
5697
_ACEOF
 
5698
if ac_fn_c_try_link "$LINENO"; then :
 
5699
  ac_cv_lib_crypto_BN_init=yes
 
5700
else
 
5701
  ac_cv_lib_crypto_BN_init=no
 
5702
fi
 
5703
rm -f core conftest.err conftest.$ac_objext \
 
5704
    conftest$ac_exeext conftest.$ac_ext
 
5705
LIBS=$ac_check_lib_save_LIBS
 
5706
fi
 
5707
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_BN_init" >&5
 
5708
$as_echo "$ac_cv_lib_crypto_BN_init" >&6; }
 
5709
if test "x$ac_cv_lib_crypto_BN_init" = x""yes; then :
 
5710
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_accept in -lssl" >&5
 
5711
$as_echo_n "checking for SSL_accept in -lssl... " >&6; }
 
5712
if test "${ac_cv_lib_ssl_SSL_accept+set}" = set; then :
 
5713
  $as_echo_n "(cached) " >&6
 
5714
else
 
5715
  ac_check_lib_save_LIBS=$LIBS
 
5716
LIBS="-lssl -lcrypto $LIBS"
 
5717
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
5718
/* end confdefs.h.  */
 
5719
 
 
5720
/* Override any GCC internal prototype to avoid an error.
 
5721
   Use char because int might match the return type of a GCC
 
5722
   builtin and then its argument prototype would still apply.  */
 
5723
#ifdef __cplusplus
 
5724
extern "C"
 
5725
#endif
 
5726
char SSL_accept ();
 
5727
int
 
5728
main ()
 
5729
{
 
5730
return SSL_accept ();
 
5731
  ;
 
5732
  return 0;
 
5733
}
 
5734
_ACEOF
 
5735
if ac_fn_c_try_link "$LINENO"; then :
 
5736
  ac_cv_lib_ssl_SSL_accept=yes
 
5737
else
 
5738
  ac_cv_lib_ssl_SSL_accept=no
 
5739
fi
 
5740
rm -f core conftest.err conftest.$ac_objext \
 
5741
    conftest$ac_exeext conftest.$ac_ext
 
5742
LIBS=$ac_check_lib_save_LIBS
 
5743
fi
 
5744
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_accept" >&5
 
5745
$as_echo "$ac_cv_lib_ssl_SSL_accept" >&6; }
 
5746
if test "x$ac_cv_lib_ssl_SSL_accept" = x""yes; then :
 
5747
  openssl_have_libs=1
 
5748
fi
 
5749
 
 
5750
fi
 
5751
 
 
5752
      if test "$openssl_have_headers" != "0" && test "$openssl_have_libs" != "0"; then
 
5753
        apu_have_openssl=1
 
5754
      fi
 
5755
    elif test "$withval" = "no"; then
 
5756
      apu_have_openssl=0
 
5757
    else
 
5758
 
 
5759
      openssl_CPPFLAGS="-I$withval/include"
 
5760
      openssl_LDFLAGS="-L$withval/lib "
 
5761
 
 
5762
 
 
5763
  if test "x$CPPFLAGS" = "x"; then
 
5764
    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$openssl_CPPFLAGS\""
 
5765
    CPPFLAGS="$openssl_CPPFLAGS"
 
5766
  else
 
5767
    apr_addto_bugger="$openssl_CPPFLAGS"
 
5768
    for i in $apr_addto_bugger; do
 
5769
      apr_addto_duplicate="0"
 
5770
      for j in $CPPFLAGS; do
 
5771
        if test "x$i" = "x$j"; then
 
5772
          apr_addto_duplicate="1"
 
5773
          break
 
5774
        fi
 
5775
      done
 
5776
      if test $apr_addto_duplicate = "0"; then
 
5777
        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
 
5778
        CPPFLAGS="$CPPFLAGS $i"
 
5779
      fi
 
5780
    done
 
5781
  fi
 
5782
 
 
5783
 
 
5784
  if test "x$LDFLAGS" = "x"; then
 
5785
    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$openssl_LDFLAGS\""
 
5786
    LDFLAGS="$openssl_LDFLAGS"
 
5787
  else
 
5788
    apr_addto_bugger="$openssl_LDFLAGS"
 
5789
    for i in $apr_addto_bugger; do
 
5790
      apr_addto_duplicate="0"
 
5791
      for j in $LDFLAGS; do
 
5792
        if test "x$i" = "x$j"; then
 
5793
          apr_addto_duplicate="1"
 
5794
          break
 
5795
        fi
 
5796
      done
 
5797
      if test $apr_addto_duplicate = "0"; then
 
5798
        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
 
5799
        LDFLAGS="$LDFLAGS $i"
 
5800
      fi
 
5801
    done
 
5802
  fi
 
5803
 
 
5804
 
 
5805
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl in $withval" >&5
 
5806
$as_echo "$as_me: checking for openssl in $withval" >&6;}
 
5807
      for ac_header in openssl/x509.h
 
5808
do :
 
5809
  ac_fn_c_check_header_mongrel "$LINENO" "openssl/x509.h" "ac_cv_header_openssl_x509_h" "$ac_includes_default"
 
5810
if test "x$ac_cv_header_openssl_x509_h" = x""yes; then :
 
5811
  cat >>confdefs.h <<_ACEOF
 
5812
#define HAVE_OPENSSL_X509_H 1
 
5813
_ACEOF
 
5814
 openssl_have_headers=1
 
5815
fi
 
5816
 
 
5817
done
 
5818
 
 
5819
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BN_init in -lcrypto" >&5
 
5820
$as_echo_n "checking for BN_init in -lcrypto... " >&6; }
 
5821
if test "${ac_cv_lib_crypto_BN_init+set}" = set; then :
 
5822
  $as_echo_n "(cached) " >&6
 
5823
else
 
5824
  ac_check_lib_save_LIBS=$LIBS
 
5825
LIBS="-lcrypto  $LIBS"
 
5826
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
5827
/* end confdefs.h.  */
 
5828
 
 
5829
/* Override any GCC internal prototype to avoid an error.
 
5830
   Use char because int might match the return type of a GCC
 
5831
   builtin and then its argument prototype would still apply.  */
 
5832
#ifdef __cplusplus
 
5833
extern "C"
 
5834
#endif
 
5835
char BN_init ();
 
5836
int
 
5837
main ()
 
5838
{
 
5839
return BN_init ();
 
5840
  ;
 
5841
  return 0;
 
5842
}
 
5843
_ACEOF
 
5844
if ac_fn_c_try_link "$LINENO"; then :
 
5845
  ac_cv_lib_crypto_BN_init=yes
 
5846
else
 
5847
  ac_cv_lib_crypto_BN_init=no
 
5848
fi
 
5849
rm -f core conftest.err conftest.$ac_objext \
 
5850
    conftest$ac_exeext conftest.$ac_ext
 
5851
LIBS=$ac_check_lib_save_LIBS
 
5852
fi
 
5853
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_BN_init" >&5
 
5854
$as_echo "$ac_cv_lib_crypto_BN_init" >&6; }
 
5855
if test "x$ac_cv_lib_crypto_BN_init" = x""yes; then :
 
5856
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_accept in -lssl" >&5
 
5857
$as_echo_n "checking for SSL_accept in -lssl... " >&6; }
 
5858
if test "${ac_cv_lib_ssl_SSL_accept+set}" = set; then :
 
5859
  $as_echo_n "(cached) " >&6
 
5860
else
 
5861
  ac_check_lib_save_LIBS=$LIBS
 
5862
LIBS="-lssl -lcrypto $LIBS"
 
5863
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
5864
/* end confdefs.h.  */
 
5865
 
 
5866
/* Override any GCC internal prototype to avoid an error.
 
5867
   Use char because int might match the return type of a GCC
 
5868
   builtin and then its argument prototype would still apply.  */
 
5869
#ifdef __cplusplus
 
5870
extern "C"
 
5871
#endif
 
5872
char SSL_accept ();
 
5873
int
 
5874
main ()
 
5875
{
 
5876
return SSL_accept ();
 
5877
  ;
 
5878
  return 0;
 
5879
}
 
5880
_ACEOF
 
5881
if ac_fn_c_try_link "$LINENO"; then :
 
5882
  ac_cv_lib_ssl_SSL_accept=yes
 
5883
else
 
5884
  ac_cv_lib_ssl_SSL_accept=no
 
5885
fi
 
5886
rm -f core conftest.err conftest.$ac_objext \
 
5887
    conftest$ac_exeext conftest.$ac_ext
 
5888
LIBS=$ac_check_lib_save_LIBS
 
5889
fi
 
5890
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_accept" >&5
 
5891
$as_echo "$ac_cv_lib_ssl_SSL_accept" >&6; }
 
5892
if test "x$ac_cv_lib_ssl_SSL_accept" = x""yes; then :
 
5893
  openssl_have_libs=1
 
5894
fi
 
5895
 
 
5896
fi
 
5897
 
 
5898
      if test "$openssl_have_headers" != "0" && test "$openssl_have_libs" != "0"; then
 
5899
        apu_have_openssl=1
 
5900
 
 
5901
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
5902
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$withval/lib\""
 
5903
    APRUTIL_LDFLAGS="-L$withval/lib"
 
5904
  else
 
5905
    apr_addto_bugger="-L$withval/lib"
 
5906
    for i in $apr_addto_bugger; do
 
5907
      apr_addto_duplicate="0"
 
5908
      for j in $APRUTIL_LDFLAGS; do
 
5909
        if test "x$i" = "x$j"; then
 
5910
          apr_addto_duplicate="1"
 
5911
          break
 
5912
        fi
 
5913
      done
 
5914
      if test $apr_addto_duplicate = "0"; then
 
5915
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
5916
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
5917
      fi
 
5918
    done
 
5919
  fi
 
5920
 
 
5921
 
 
5922
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
5923
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$withval/include\""
 
5924
    APRUTIL_INCLUDES="-I$withval/include"
 
5925
  else
 
5926
    apr_addto_bugger="-I$withval/include"
 
5927
    for i in $apr_addto_bugger; do
 
5928
      apr_addto_duplicate="0"
 
5929
      for j in $APRUTIL_INCLUDES; do
 
5930
        if test "x$i" = "x$j"; then
 
5931
          apr_addto_duplicate="1"
 
5932
          break
 
5933
        fi
 
5934
      done
 
5935
      if test $apr_addto_duplicate = "0"; then
 
5936
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
5937
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
5938
      fi
 
5939
    done
 
5940
  fi
 
5941
 
 
5942
      fi
 
5943
 
 
5944
      if test "$apu_have_openssl" != "1"; then
 
5945
        for ac_header in openssl/x509.h
 
5946
do :
 
5947
  ac_fn_c_check_header_mongrel "$LINENO" "openssl/x509.h" "ac_cv_header_openssl_x509_h" "$ac_includes_default"
 
5948
if test "x$ac_cv_header_openssl_x509_h" = x""yes; then :
 
5949
  cat >>confdefs.h <<_ACEOF
 
5950
#define HAVE_OPENSSL_X509_H 1
 
5951
_ACEOF
 
5952
 openssl_have_headers=1
 
5953
fi
 
5954
 
 
5955
done
 
5956
 
 
5957
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BN_init in -lcrypto" >&5
 
5958
$as_echo_n "checking for BN_init in -lcrypto... " >&6; }
 
5959
if test "${ac_cv_lib_crypto_BN_init+set}" = set; then :
 
5960
  $as_echo_n "(cached) " >&6
 
5961
else
 
5962
  ac_check_lib_save_LIBS=$LIBS
 
5963
LIBS="-lcrypto  $LIBS"
 
5964
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
5965
/* end confdefs.h.  */
 
5966
 
 
5967
/* Override any GCC internal prototype to avoid an error.
 
5968
   Use char because int might match the return type of a GCC
 
5969
   builtin and then its argument prototype would still apply.  */
 
5970
#ifdef __cplusplus
 
5971
extern "C"
 
5972
#endif
 
5973
char BN_init ();
 
5974
int
 
5975
main ()
 
5976
{
 
5977
return BN_init ();
 
5978
  ;
 
5979
  return 0;
 
5980
}
 
5981
_ACEOF
 
5982
if ac_fn_c_try_link "$LINENO"; then :
 
5983
  ac_cv_lib_crypto_BN_init=yes
 
5984
else
 
5985
  ac_cv_lib_crypto_BN_init=no
 
5986
fi
 
5987
rm -f core conftest.err conftest.$ac_objext \
 
5988
    conftest$ac_exeext conftest.$ac_ext
 
5989
LIBS=$ac_check_lib_save_LIBS
 
5990
fi
 
5991
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_BN_init" >&5
 
5992
$as_echo "$ac_cv_lib_crypto_BN_init" >&6; }
 
5993
if test "x$ac_cv_lib_crypto_BN_init" = x""yes; then :
 
5994
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_accept in -lssl" >&5
 
5995
$as_echo_n "checking for SSL_accept in -lssl... " >&6; }
 
5996
if test "${ac_cv_lib_ssl_SSL_accept+set}" = set; then :
 
5997
  $as_echo_n "(cached) " >&6
 
5998
else
 
5999
  ac_check_lib_save_LIBS=$LIBS
 
6000
LIBS="-lssl -lcrypto $LIBS"
 
6001
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
6002
/* end confdefs.h.  */
 
6003
 
 
6004
/* Override any GCC internal prototype to avoid an error.
 
6005
   Use char because int might match the return type of a GCC
 
6006
   builtin and then its argument prototype would still apply.  */
 
6007
#ifdef __cplusplus
 
6008
extern "C"
 
6009
#endif
 
6010
char SSL_accept ();
 
6011
int
 
6012
main ()
 
6013
{
 
6014
return SSL_accept ();
 
6015
  ;
 
6016
  return 0;
 
6017
}
 
6018
_ACEOF
 
6019
if ac_fn_c_try_link "$LINENO"; then :
 
6020
  ac_cv_lib_ssl_SSL_accept=yes
 
6021
else
 
6022
  ac_cv_lib_ssl_SSL_accept=no
 
6023
fi
 
6024
rm -f core conftest.err conftest.$ac_objext \
 
6025
    conftest$ac_exeext conftest.$ac_ext
 
6026
LIBS=$ac_check_lib_save_LIBS
 
6027
fi
 
6028
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_accept" >&5
 
6029
$as_echo "$ac_cv_lib_ssl_SSL_accept" >&6; }
 
6030
if test "x$ac_cv_lib_ssl_SSL_accept" = x""yes; then :
 
6031
  openssl_have_libs=1
 
6032
fi
 
6033
 
 
6034
fi
 
6035
 
 
6036
        if test "$openssl_have_headers" != "0" && test "$openssl_have_libs" != "0"; then
 
6037
          apu_have_openssl=1
 
6038
 
 
6039
  if test "x$APRUTIL_LDFLAGS" = "x"; then
 
6040
    test "x$silent" != "xyes" && echo "  setting APRUTIL_LDFLAGS to \"-L$withval/lib\""
 
6041
    APRUTIL_LDFLAGS="-L$withval/lib"
 
6042
  else
 
6043
    apr_addto_bugger="-L$withval/lib"
 
6044
    for i in $apr_addto_bugger; do
 
6045
      apr_addto_duplicate="0"
 
6046
      for j in $APRUTIL_LDFLAGS; do
 
6047
        if test "x$i" = "x$j"; then
 
6048
          apr_addto_duplicate="1"
 
6049
          break
 
6050
        fi
 
6051
      done
 
6052
      if test $apr_addto_duplicate = "0"; then
 
6053
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_LDFLAGS"
 
6054
        APRUTIL_LDFLAGS="$APRUTIL_LDFLAGS $i"
 
6055
      fi
 
6056
    done
 
6057
  fi
 
6058
 
 
6059
 
 
6060
  if test "x$APRUTIL_INCLUDES" = "x"; then
 
6061
    test "x$silent" != "xyes" && echo "  setting APRUTIL_INCLUDES to \"-I$withval/include\""
 
6062
    APRUTIL_INCLUDES="-I$withval/include"
 
6063
  else
 
6064
    apr_addto_bugger="-I$withval/include"
 
6065
    for i in $apr_addto_bugger; do
 
6066
      apr_addto_duplicate="0"
 
6067
      for j in $APRUTIL_INCLUDES; do
 
6068
        if test "x$i" = "x$j"; then
 
6069
          apr_addto_duplicate="1"
 
6070
          break
 
6071
        fi
 
6072
      done
 
6073
      if test $apr_addto_duplicate = "0"; then
 
6074
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_INCLUDES"
 
6075
        APRUTIL_INCLUDES="$APRUTIL_INCLUDES $i"
 
6076
      fi
 
6077
    done
 
6078
  fi
 
6079
 
 
6080
        fi
 
6081
      fi
 
6082
 
 
6083
      ac_fn_c_check_decl "$LINENO" "EVP_PKEY_CTX_new" "ac_cv_have_decl_EVP_PKEY_CTX_new" "#include <openssl/evp.h>
 
6084
"
 
6085
if test "x$ac_cv_have_decl_EVP_PKEY_CTX_new" = x""yes; then :
 
6086
  ac_have_decl=1
 
6087
else
 
6088
  ac_have_decl=0
 
6089
fi
 
6090
 
 
6091
cat >>confdefs.h <<_ACEOF
 
6092
#define HAVE_DECL_EVP_PKEY_CTX_NEW $ac_have_decl
 
6093
_ACEOF
 
6094
 
 
6095
 
 
6096
    fi
 
6097
 
 
6098
else
 
6099
 
 
6100
    apu_have_openssl=0
 
6101
 
 
6102
fi
 
6103
 
 
6104
 
 
6105
 
 
6106
 
 
6107
      if test "$apu_have_openssl" = "1"; then
 
6108
    LDADD_crypto_openssl="$openssl_LDFLAGS -lssl -lcrypto"
 
6109
    apu_have_crypto=1
 
6110
 
 
6111
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for const input buffers in OpenSSL" >&5
 
6112
$as_echo_n "checking for const input buffers in OpenSSL... " >&6; }
 
6113
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
6114
/* end confdefs.h.  */
 
6115
#include <openssl/rsa.h>
 
6116
int
 
6117
main ()
 
6118
{
 
6119
 const unsigned char * buf;
 
6120
          unsigned char * outbuf;
 
6121
          RSA rsa;
 
6122
 
 
6123
                RSA_private_decrypt(1,
 
6124
                                                        buf,
 
6125
                                                        outbuf,
 
6126
                                                        &rsa,
 
6127
                                                        RSA_PKCS1_PADDING);
 
6128
 
 
6129
 
 
6130
  ;
 
6131
  return 0;
 
6132
}
 
6133
_ACEOF
 
6134
if ac_fn_c_try_compile "$LINENO"; then :
 
6135
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 
6136
$as_echo "yes" >&6; }
 
6137
 
 
6138
$as_echo "#define CRYPTO_OPENSSL_CONST_BUFFERS 1" >>confdefs.h
 
6139
 
 
6140
else
 
6141
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 
6142
$as_echo "no" >&6; }
 
6143
fi
 
6144
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
6145
 
 
6146
  fi
 
6147
 
 
6148
 
 
6149
 
 
6150
  LIBS="$old_libs"
 
6151
  CPPFLAGS="$old_cppflags"
 
6152
  LDFLAGS="$old_ldflags"
 
6153
 
 
6154
 
 
6155
  apu_have_nss=0
 
6156
  nss_have_headers=0
 
6157
  nss_have_libs=0
 
6158
 
 
6159
  old_libs="$LIBS"
 
6160
  old_cppflags="$CPPFLAGS"
 
6161
  old_ldflags="$LDFLAGS"
 
6162
 
 
6163
 
 
6164
# Check whether --with-nss was given.
 
6165
if test "${with_nss+set}" = set; then :
 
6166
  withval=$with_nss;
 
6167
 
 
6168
    if test "$withval" = "yes"; then
 
6169
      if test -n "$ac_tool_prefix"; then
 
6170
  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
 
6171
set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
 
6172
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 
6173
$as_echo_n "checking for $ac_word... " >&6; }
 
6174
if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
 
6175
  $as_echo_n "(cached) " >&6
 
6176
else
 
6177
  case $PKG_CONFIG in
 
6178
  [\\/]* | ?:[\\/]*)
 
6179
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
 
6180
  ;;
 
6181
  *)
 
6182
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
6183
for as_dir in $PATH
 
6184
do
 
6185
  IFS=$as_save_IFS
 
6186
  test -z "$as_dir" && as_dir=.
 
6187
    for ac_exec_ext in '' $ac_executable_extensions; do
 
6188
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
6189
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
 
6190
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
 
6191
    break 2
 
6192
  fi
 
6193
done
 
6194
  done
 
6195
IFS=$as_save_IFS
 
6196
 
 
6197
  ;;
 
6198
esac
 
6199
fi
 
6200
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
 
6201
if test -n "$PKG_CONFIG"; then
 
6202
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
 
6203
$as_echo "$PKG_CONFIG" >&6; }
 
6204
else
 
6205
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 
6206
$as_echo "no" >&6; }
 
6207
fi
 
6208
 
 
6209
 
 
6210
fi
 
6211
if test -z "$ac_cv_path_PKG_CONFIG"; then
 
6212
  ac_pt_PKG_CONFIG=$PKG_CONFIG
 
6213
  # Extract the first word of "pkg-config", so it can be a program name with args.
 
6214
set dummy pkg-config; ac_word=$2
 
6215
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 
6216
$as_echo_n "checking for $ac_word... " >&6; }
 
6217
if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
 
6218
  $as_echo_n "(cached) " >&6
 
6219
else
 
6220
  case $ac_pt_PKG_CONFIG in
 
6221
  [\\/]* | ?:[\\/]*)
 
6222
  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
 
6223
  ;;
 
6224
  *)
 
6225
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 
6226
for as_dir in $PATH
 
6227
do
 
6228
  IFS=$as_save_IFS
 
6229
  test -z "$as_dir" && as_dir=.
 
6230
    for ac_exec_ext in '' $ac_executable_extensions; do
 
6231
  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
 
6232
    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
 
6233
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
 
6234
    break 2
 
6235
  fi
 
6236
done
 
6237
  done
 
6238
IFS=$as_save_IFS
 
6239
 
 
6240
  ;;
 
6241
esac
 
6242
fi
 
6243
ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
 
6244
if test -n "$ac_pt_PKG_CONFIG"; then
 
6245
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
 
6246
$as_echo "$ac_pt_PKG_CONFIG" >&6; }
 
6247
else
 
6248
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 
6249
$as_echo "no" >&6; }
 
6250
fi
 
6251
 
 
6252
  if test "x$ac_pt_PKG_CONFIG" = x; then
 
6253
    PKG_CONFIG=""
 
6254
  else
 
6255
    case $cross_compiling:$ac_tool_warned in
 
6256
yes:)
 
6257
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
 
6258
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
 
6259
ac_tool_warned=yes ;;
 
6260
esac
 
6261
    PKG_CONFIG=$ac_pt_PKG_CONFIG
 
6262
  fi
 
6263
else
 
6264
  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
 
6265
fi
 
6266
 
 
6267
      if test -n "$PKG_CONFIG"; then
 
6268
        nss_CPPFLAGS=`$PKG_CONFIG --cflags-only-I nss`
 
6269
        nss_LDFLAGS=`$PKG_CONFIG --libs nss`
 
6270
 
 
6271
  if test "x$CPPFLAGS" = "x"; then
 
6272
    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$nss_CPPFLAGS\""
 
6273
    CPPFLAGS="$nss_CPPFLAGS"
 
6274
  else
 
6275
    apr_addto_bugger="$nss_CPPFLAGS"
 
6276
    for i in $apr_addto_bugger; do
 
6277
      apr_addto_duplicate="0"
 
6278
      for j in $CPPFLAGS; do
 
6279
        if test "x$i" = "x$j"; then
 
6280
          apr_addto_duplicate="1"
 
6281
          break
 
6282
        fi
 
6283
      done
 
6284
      if test $apr_addto_duplicate = "0"; then
 
6285
        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
 
6286
        CPPFLAGS="$CPPFLAGS $i"
 
6287
      fi
 
6288
    done
 
6289
  fi
 
6290
 
 
6291
 
 
6292
  if test "x$LDFLAGS" = "x"; then
 
6293
    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$nss_LDFLAGS\""
 
6294
    LDFLAGS="$nss_LDFLAGS"
 
6295
  else
 
6296
    apr_addto_bugger="$nss_LDFLAGS"
 
6297
    for i in $apr_addto_bugger; do
 
6298
      apr_addto_duplicate="0"
 
6299
      for j in $LDFLAGS; do
 
6300
        if test "x$i" = "x$j"; then
 
6301
          apr_addto_duplicate="1"
 
6302
          break
 
6303
        fi
 
6304
      done
 
6305
      if test $apr_addto_duplicate = "0"; then
 
6306
        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
 
6307
        LDFLAGS="$LDFLAGS $i"
 
6308
      fi
 
6309
    done
 
6310
  fi
 
6311
 
 
6312
      fi
 
6313
      for ac_header in prerror.h nss/nss.h nss.h nss/pk11pub.h pk11pub.h
 
6314
do :
 
6315
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 
6316
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
 
6317
eval as_val=\$$as_ac_Header
 
6318
   if test "x$as_val" = x""yes; then :
 
6319
  cat >>confdefs.h <<_ACEOF
 
6320
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 
6321
_ACEOF
 
6322
 nss_have_headers=1
 
6323
fi
 
6324
 
 
6325
done
 
6326
 
 
6327
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PR_Initialize in -lnspr4" >&5
 
6328
$as_echo_n "checking for PR_Initialize in -lnspr4... " >&6; }
 
6329
if test "${ac_cv_lib_nspr4_PR_Initialize+set}" = set; then :
 
6330
  $as_echo_n "(cached) " >&6
 
6331
else
 
6332
  ac_check_lib_save_LIBS=$LIBS
 
6333
LIBS="-lnspr4  $LIBS"
 
6334
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
6335
/* end confdefs.h.  */
 
6336
 
 
6337
/* Override any GCC internal prototype to avoid an error.
 
6338
   Use char because int might match the return type of a GCC
 
6339
   builtin and then its argument prototype would still apply.  */
 
6340
#ifdef __cplusplus
 
6341
extern "C"
 
6342
#endif
 
6343
char PR_Initialize ();
 
6344
int
 
6345
main ()
 
6346
{
 
6347
return PR_Initialize ();
 
6348
  ;
 
6349
  return 0;
 
6350
}
 
6351
_ACEOF
 
6352
if ac_fn_c_try_link "$LINENO"; then :
 
6353
  ac_cv_lib_nspr4_PR_Initialize=yes
 
6354
else
 
6355
  ac_cv_lib_nspr4_PR_Initialize=no
 
6356
fi
 
6357
rm -f core conftest.err conftest.$ac_objext \
 
6358
    conftest$ac_exeext conftest.$ac_ext
 
6359
LIBS=$ac_check_lib_save_LIBS
 
6360
fi
 
6361
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nspr4_PR_Initialize" >&5
 
6362
$as_echo "$ac_cv_lib_nspr4_PR_Initialize" >&6; }
 
6363
if test "x$ac_cv_lib_nspr4_PR_Initialize" = x""yes; then :
 
6364
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PK11_CreatePBEV2AlgorithmID in -lnss3" >&5
 
6365
$as_echo_n "checking for PK11_CreatePBEV2AlgorithmID in -lnss3... " >&6; }
 
6366
if test "${ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID+set}" = set; then :
 
6367
  $as_echo_n "(cached) " >&6
 
6368
else
 
6369
  ac_check_lib_save_LIBS=$LIBS
 
6370
LIBS="-lnss3 -lnspr4 $LIBS"
 
6371
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
6372
/* end confdefs.h.  */
 
6373
 
 
6374
/* Override any GCC internal prototype to avoid an error.
 
6375
   Use char because int might match the return type of a GCC
 
6376
   builtin and then its argument prototype would still apply.  */
 
6377
#ifdef __cplusplus
 
6378
extern "C"
 
6379
#endif
 
6380
char PK11_CreatePBEV2AlgorithmID ();
 
6381
int
 
6382
main ()
 
6383
{
 
6384
return PK11_CreatePBEV2AlgorithmID ();
 
6385
  ;
 
6386
  return 0;
 
6387
}
 
6388
_ACEOF
 
6389
if ac_fn_c_try_link "$LINENO"; then :
 
6390
  ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID=yes
 
6391
else
 
6392
  ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID=no
 
6393
fi
 
6394
rm -f core conftest.err conftest.$ac_objext \
 
6395
    conftest$ac_exeext conftest.$ac_ext
 
6396
LIBS=$ac_check_lib_save_LIBS
 
6397
fi
 
6398
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID" >&5
 
6399
$as_echo "$ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID" >&6; }
 
6400
if test "x$ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID" = x""yes; then :
 
6401
  nss_have_libs=1
 
6402
fi
 
6403
 
 
6404
fi
 
6405
 
 
6406
      if test "$nss_have_headers" != "0" && test "$nss_have_libs" != "0"; then
 
6407
        apu_have_nss=1
 
6408
      fi
 
6409
    elif test "$withval" = "no"; then
 
6410
      apu_have_nss=0
 
6411
    elif test "x$withval" != "x"; then
 
6412
 
 
6413
      nss_CPPFLAGS="-I$withval/include/nss -I$withval/include/nss3 -I$withval/include/nspr -I$withval/include/nspr4 -I$withval/include -I$withval/../public"
 
6414
      nss_LDFLAGS="-L$withval/lib "
 
6415
 
 
6416
 
 
6417
  if test "x$CPPFLAGS" = "x"; then
 
6418
    test "x$silent" != "xyes" && echo "  setting CPPFLAGS to \"$nss_CPPFLAGS\""
 
6419
    CPPFLAGS="$nss_CPPFLAGS"
 
6420
  else
 
6421
    apr_addto_bugger="$nss_CPPFLAGS"
 
6422
    for i in $apr_addto_bugger; do
 
6423
      apr_addto_duplicate="0"
 
6424
      for j in $CPPFLAGS; do
 
6425
        if test "x$i" = "x$j"; then
 
6426
          apr_addto_duplicate="1"
 
6427
          break
 
6428
        fi
 
6429
      done
 
6430
      if test $apr_addto_duplicate = "0"; then
 
6431
        test "x$silent" != "xyes" && echo "  adding \"$i\" to CPPFLAGS"
 
6432
        CPPFLAGS="$CPPFLAGS $i"
 
6433
      fi
 
6434
    done
 
6435
  fi
 
6436
 
 
6437
 
 
6438
  if test "x$LDFLAGS" = "x"; then
 
6439
    test "x$silent" != "xyes" && echo "  setting LDFLAGS to \"$nss_LDFLAGS\""
 
6440
    LDFLAGS="$nss_LDFLAGS"
 
6441
  else
 
6442
    apr_addto_bugger="$nss_LDFLAGS"
 
6443
    for i in $apr_addto_bugger; do
 
6444
      apr_addto_duplicate="0"
 
6445
      for j in $LDFLAGS; do
 
6446
        if test "x$i" = "x$j"; then
 
6447
          apr_addto_duplicate="1"
 
6448
          break
 
6449
        fi
 
6450
      done
 
6451
      if test $apr_addto_duplicate = "0"; then
 
6452
        test "x$silent" != "xyes" && echo "  adding \"$i\" to LDFLAGS"
 
6453
        LDFLAGS="$LDFLAGS $i"
 
6454
      fi
 
6455
    done
 
6456
  fi
 
6457
 
 
6458
 
 
6459
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nss in $withval" >&5
 
6460
$as_echo "$as_me: checking for nss in $withval" >&6;}
 
6461
      for ac_header in prerror.h nss/nss.h nss.h nss/pk11pub.h pk11pub.h
 
6462
do :
 
6463
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 
6464
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
 
6465
eval as_val=\$$as_ac_Header
 
6466
   if test "x$as_val" = x""yes; then :
 
6467
  cat >>confdefs.h <<_ACEOF
 
6468
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 
6469
_ACEOF
 
6470
 nss_have_headers=1
 
6471
fi
 
6472
 
 
6473
done
 
6474
 
 
6475
      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PR_Initialize in -lnspr4" >&5
 
6476
$as_echo_n "checking for PR_Initialize in -lnspr4... " >&6; }
 
6477
if test "${ac_cv_lib_nspr4_PR_Initialize+set}" = set; then :
 
6478
  $as_echo_n "(cached) " >&6
 
6479
else
 
6480
  ac_check_lib_save_LIBS=$LIBS
 
6481
LIBS="-lnspr4  $LIBS"
 
6482
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
6483
/* end confdefs.h.  */
 
6484
 
 
6485
/* Override any GCC internal prototype to avoid an error.
 
6486
   Use char because int might match the return type of a GCC
 
6487
   builtin and then its argument prototype would still apply.  */
 
6488
#ifdef __cplusplus
 
6489
extern "C"
 
6490
#endif
 
6491
char PR_Initialize ();
 
6492
int
 
6493
main ()
 
6494
{
 
6495
return PR_Initialize ();
 
6496
  ;
 
6497
  return 0;
 
6498
}
 
6499
_ACEOF
 
6500
if ac_fn_c_try_link "$LINENO"; then :
 
6501
  ac_cv_lib_nspr4_PR_Initialize=yes
 
6502
else
 
6503
  ac_cv_lib_nspr4_PR_Initialize=no
 
6504
fi
 
6505
rm -f core conftest.err conftest.$ac_objext \
 
6506
    conftest$ac_exeext conftest.$ac_ext
 
6507
LIBS=$ac_check_lib_save_LIBS
 
6508
fi
 
6509
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nspr4_PR_Initialize" >&5
 
6510
$as_echo "$ac_cv_lib_nspr4_PR_Initialize" >&6; }
 
6511
if test "x$ac_cv_lib_nspr4_PR_Initialize" = x""yes; then :
 
6512
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PK11_CreatePBEV2AlgorithmID in -lnss3" >&5
 
6513
$as_echo_n "checking for PK11_CreatePBEV2AlgorithmID in -lnss3... " >&6; }
 
6514
if test "${ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID+set}" = set; then :
 
6515
  $as_echo_n "(cached) " >&6
 
6516
else
 
6517
  ac_check_lib_save_LIBS=$LIBS
 
6518
LIBS="-lnss3 -lnspr4 $LIBS"
 
6519
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 
6520
/* end confdefs.h.  */
 
6521
 
 
6522
/* Override any GCC internal prototype to avoid an error.
 
6523
   Use char because int might match the return type of a GCC
 
6524
   builtin and then its argument prototype would still apply.  */
 
6525
#ifdef __cplusplus
 
6526
extern "C"
 
6527
#endif
 
6528
char PK11_CreatePBEV2AlgorithmID ();
 
6529
int
 
6530
main ()
 
6531
{
 
6532
return PK11_CreatePBEV2AlgorithmID ();
 
6533
  ;
 
6534
  return 0;
 
6535
}
 
6536
_ACEOF
 
6537
if ac_fn_c_try_link "$LINENO"; then :
 
6538
  ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID=yes
 
6539
else
 
6540
  ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID=no
 
6541
fi
 
6542
rm -f core conftest.err conftest.$ac_objext \
 
6543
    conftest$ac_exeext conftest.$ac_ext
 
6544
LIBS=$ac_check_lib_save_LIBS
 
6545
fi
 
6546
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID" >&5
 
6547
$as_echo "$ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID" >&6; }
 
6548
if test "x$ac_cv_lib_nss3_PK11_CreatePBEV2AlgorithmID" = x""yes; then :
 
6549
  nss_have_libs=1
 
6550
fi
 
6551
 
 
6552
fi
 
6553
 
 
6554
      if test "$nss_have_headers" != "0" && test "$nss_have_libs" != "0"; then
 
6555
        apu_have_nss=1
 
6556
      fi
 
6557
 
 
6558
    fi
 
6559
    if test "$apu_have_nss" != "0"; then
 
6560
 
 
6561
  if test "x$APRUTIL_PRIV_INCLUDES" = "x"; then
 
6562
    test "x$silent" != "xyes" && echo "  setting APRUTIL_PRIV_INCLUDES to \"$nss_CPPFLAGS\""
 
6563
    APRUTIL_PRIV_INCLUDES="$nss_CPPFLAGS"
 
6564
  else
 
6565
    apr_addto_bugger="$nss_CPPFLAGS"
 
6566
    for i in $apr_addto_bugger; do
 
6567
      apr_addto_duplicate="0"
 
6568
      for j in $APRUTIL_PRIV_INCLUDES; do
 
6569
        if test "x$i" = "x$j"; then
 
6570
          apr_addto_duplicate="1"
 
6571
          break
 
6572
        fi
 
6573
      done
 
6574
      if test $apr_addto_duplicate = "0"; then
 
6575
        test "x$silent" != "xyes" && echo "  adding \"$i\" to APRUTIL_PRIV_INCLUDES"
 
6576
        APRUTIL_PRIV_INCLUDES="$APRUTIL_PRIV_INCLUDES $i"
 
6577
      fi
 
6578
    done
 
6579
  fi
 
6580
 
 
6581
    fi
 
6582
 
 
6583
else
 
6584
 
 
6585
    apu_have_nss=0
 
6586
 
 
6587
fi
 
6588
 
 
6589
 
 
6590
 
 
6591
 
 
6592
      if test "$apu_have_nss" = "1"; then
 
6593
    LDADD_crypto_nss="$nss_LDFLAGS -lnspr4 -lnss3"
 
6594
    apu_have_crypto=1
 
6595
  fi
 
6596
 
 
6597
 
 
6598
 
 
6599
  LIBS="$old_libs"
 
6600
  CPPFLAGS="$old_cppflags"
 
6601
  LDFLAGS="$old_ldflags"
 
6602
 
 
6603
 
4609
6604
 
4610
6605
echo $ac_n "${nl}checking for ldap support..."
4611
6606
 
10386
12381
 
10387
12382
  int main(int argc, const char *const *argv) {
10388
12383
 
10389
 
    int tmp = ldap_set_rebind_proc((LDAP *)0, (LDAP_REBIND_PROC *)0, (void *)0);
10390
 
    /* use tmp to suppress the warning */
10391
 
    tmp=0;
 
12384
    ldap_set_rebind_proc((LDAP *)0, (LDAP_REBIND_PROC *)0, (void *)0);
10392
12385
 
10393
12386
     return 0; }
10394
12387
_ACEOF
34349
36342
 
34350
36343
     # Statically link the drivers:
34351
36344
     objs=
 
36345
     test $apu_have_openssl = 1 && objs="$objs crypto/apr_crypto_openssl.lo"
 
36346
     test $apu_have_nss = 1 && objs="$objs crypto/apr_crypto_nss.lo"
34352
36347
     test $apu_have_oracle = 1 && objs="$objs dbd/apr_dbd_oracle.lo"
34353
36348
     test $apu_have_pgsql = 1 && objs="$objs dbd/apr_dbd_pgsql.lo"
34354
36349
     test $apu_have_mysql = 1 && objs="$objs dbd/apr_dbd_mysql.lo"
34378
36373
       done
34379
36374
     fi
34380
36375
 
 
36376
     APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_crypto_openssl $LDADD_crypto_nss"
34381
36377
     APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_dbd_pgsql $LDADD_dbd_sqlite2 $LDADD_dbd_sqlite3 $LDADD_dbd_oracle $LDADD_dbd_mysql $LDADD_dbd_freetds $LDADD_dbd_odbc"
34382
36378
     APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_dbm_db $LDADD_dbm_gdbm $LDADD_dbm_ndbm"
34383
36379
     APRUTIL_LIBS="$APRUTIL_LIBS $LDADD_ldap"
 
36380
     APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_crypto_openssl $LDADD_crypto_nss"
34384
36381
     APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_dbd_pgsql $LDADD_dbd_sqlite2 $LDADD_dbd_sqlite3 $LDADD_dbd_oracle $LDADD_dbd_mysql $LDADD_dbd_freetds $LDADD_dbd_odbc"
34385
36382
     APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_dbm_db $LDADD_dbm_gdbm $LDADD_dbm_ndbm"
34386
36383
     APRUTIL_EXPORT_LIBS="$APRUTIL_EXPORT_LIBS $LDADD_ldap"
34389
36386
 
34390
36387
     # Build the drivers as loadable modules:
34391
36388
     dsos=
 
36389
     test $apu_have_openssl = 1 && dsos="$dsos crypto/apr_crypto_openssl.la"
 
36390
     test $apu_have_nss = 1 && dsos="$dsos crypto/apr_crypto_nss.la"
34392
36391
     test $apu_have_oracle = 1 && dsos="$dsos dbd/apr_dbd_oracle.la"
34393
36392
     test $apu_have_pgsql = 1 && dsos="$dsos dbd/apr_dbd_pgsql.la"
34394
36393
     test $apu_have_mysql = 1 && dsos="$dsos dbd/apr_dbd_mysql.la"