summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorKamil Dudka <kdudka@redhat.com>2015-04-08 15:19:37 +0200
committerKamil Dudka <kdudka@redhat.com>2015-04-17 16:43:20 +0200
commit8dc3bbf0f8e201ff07dc1e50757d16004dc09d1e (patch)
tree091f707868368ba119e65fc9fa6fa94ad9fd7057 /configure.ac
parent67a8bbb51a941ea6742914234a3bb5af5cf3550e (diff)
downloadcurl-8dc3bbf0f8e201ff07dc1e50757d16004dc09d1e.tar.gz
configure --with-nss: drop redundant if statement
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac76
1 files changed, 36 insertions, 40 deletions
diff --git a/configure.ac b/configure.ac
index 019f4235c..527417cf4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2145,53 +2145,49 @@ if test "$curl_ssl_msg" = "$init_ssl_msg"; then
nssprefix=$OPT_NSS
fi
- # the following check is always satisfied
- if test -n "$addlib"; then
-
- CLEANLDFLAGS="$LDFLAGS"
- CLEANLIBS="$LIBS"
- CLEANCPPFLAGS="$CPPFLAGS"
+ CLEANLDFLAGS="$LDFLAGS"
+ CLEANLIBS="$LIBS"
+ CLEANCPPFLAGS="$CPPFLAGS"
- LDFLAGS="$addld $LDFLAGS"
- LIBS="$addlib $LIBS"
- if test "$addcflags" != "-I/usr/include"; then
- CPPFLAGS="$CPPFLAGS $addcflags"
- fi
+ LDFLAGS="$addld $LDFLAGS"
+ LIBS="$addlib $LIBS"
+ if test "$addcflags" != "-I/usr/include"; then
+ CPPFLAGS="$CPPFLAGS $addcflags"
+ fi
- dnl The function SSL_VersionRangeSet() is needed to enable TLS > 1.0
- AC_CHECK_LIB(nss3, SSL_VersionRangeSet,
- [
- AC_DEFINE(USE_NSS, 1, [if NSS is enabled])
- AC_SUBST(USE_NSS, [1])
- USE_NSS="yes"
- NSS_ENABLED=1
- curl_ssl_msg="enabled (NSS)"
- ],
- [
- LDFLAGS="$CLEANLDFLAGS"
- LIBS="$CLEANLIBS"
- CPPFLAGS="$CLEANCPPFLAGS"
- ])
+ dnl The function SSL_VersionRangeSet() is needed to enable TLS > 1.0
+ AC_CHECK_LIB(nss3, SSL_VersionRangeSet,
+ [
+ AC_DEFINE(USE_NSS, 1, [if NSS is enabled])
+ AC_SUBST(USE_NSS, [1])
+ USE_NSS="yes"
+ NSS_ENABLED=1
+ curl_ssl_msg="enabled (NSS)"
+ ],
+ [
+ LDFLAGS="$CLEANLDFLAGS"
+ LIBS="$CLEANLIBS"
+ CPPFLAGS="$CLEANCPPFLAGS"
+ ])
- if test "x$USE_NSS" = "xyes"; then
- AC_MSG_NOTICE([detected NSS version $version])
+ if test "x$USE_NSS" = "xyes"; then
+ AC_MSG_NOTICE([detected NSS version $version])
- dnl needed when linking the curl tool without USE_EXPLICIT_LIB_DEPS
- NSS_LIBS=$addlib
- AC_SUBST([NSS_LIBS])
+ dnl needed when linking the curl tool without USE_EXPLICIT_LIB_DEPS
+ NSS_LIBS=$addlib
+ AC_SUBST([NSS_LIBS])
- dnl when shared libs were found in a path that the run-time
- dnl linker doesn't search through, we need to add it to
- dnl LD_LIBRARY_PATH to prevent further configure tests to fail
- dnl due to this
- if test "x$cross_compiling" != "xyes"; then
- LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$nssprefix/lib$libsuff"
- export LD_LIBRARY_PATH
- AC_MSG_NOTICE([Added $nssprefix/lib$libsuff to LD_LIBRARY_PATH])
- fi
+ dnl when shared libs were found in a path that the run-time
+ dnl linker doesn't search through, we need to add it to
+ dnl LD_LIBRARY_PATH to prevent further configure tests to fail
+ dnl due to this
+ if test "x$cross_compiling" != "xyes"; then
+ LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$nssprefix/lib$libsuff"
+ export LD_LIBRARY_PATH
+ AC_MSG_NOTICE([Added $nssprefix/lib$libsuff to LD_LIBRARY_PATH])
fi
- fi
+ fi dnl NSS found
fi dnl NSS not disabled