[sword-svn] r2756 - trunk

scribe at crosswire.org scribe at crosswire.org
Sun Dec 30 20:12:26 MST 2012


Author: scribe
Date: 2012-12-30 20:12:26 -0700 (Sun, 30 Dec 2012)
New Revision: 2756

Modified:
   trunk/configure.ac
Log:
added detection for CURL SFTP support


Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2012-12-31 02:56:17 UTC (rev 2755)
+++ trunk/configure.ac	2012-12-31 03:12:26 UTC (rev 2756)
@@ -57,6 +57,8 @@
 	AC_HELP_STRING([--with-conf],[install a new sword.conf (default=yes)]),,with_conf=yes)
 AC_ARG_WITH(curl,
 	AC_HELP_STRING([--with-curl],[build install manager support using libcurl (default=yes)]),,with_curl=yes)
+AC_ARG_WITH(curl_sftp,
+	AC_HELP_STRING([--with-curl_sftp],[build install manager support using libcurl+sftp (requires --with-curl, default=yes)]),,with_curl_sftp=yes)
 #AC_ARG_WITH(lucene,
 #	AC_HELP_STRING([--with-lucene],[include lucene support for searching (default=no)]),,with_lucene=no)
 AC_ARG_WITH([internalregex],
@@ -234,6 +236,7 @@
 	echo "*** The curl-config script installed by curl could not be found"
 	echo "*** compiling without libcurl support"
 	with_curl=no
+	with_curl_sftp=no
 	with_internalftplib=yes
     else
 	echo "curl found - remote install options available"
@@ -242,9 +245,18 @@
 	AM_CXXFLAGS="$AM_CXXFLAGS -DCURLAVAILABLE $CURL_AM_CFLAGS"
 	AM_CFLAGS="$AM_CFLAGS -DCURLAVAILABLE $CURL_AM_CFLAGS"
 	LIBS="$LIBS $CURL_LIBS"
+	if test x$with_curl_sftp = xyes; then
+		if test x`$CURL_CONFIG --protocols|grep SFTP|wc -l` = x1; then
+			AM_CXXFLAGS="$AM_CXXFLAGS -DCURLSFTPAVAILABLE"
+			AM_CFLAGS="$AM_CFLAGS -DCURLSFTPAVAILABLE"
+		else
+			with_curl_sftp=no;
+		fi
+	fi
     fi
 else
 	with_curl=no;
+	with_curl_sftp=no;
 	with_internalftplib=yes
 fi
 
@@ -330,6 +342,7 @@
 AM_CONDITIONAL(SHAREDLIB, test x$enable_shared = xyes)
 AM_CONDITIONAL(INSTCONF, test x$with_conf = xyes)
 AM_CONDITIONAL(WITHCURL, test x$with_curl = xyes)
+AM_CONDITIONAL(WITHCURLSFTP, test x$with_curl_sftp = xyes)
 AM_CONDITIONAL(INTERNALFTPLIB, test x$with_internalftplib = xyes)
 AM_CONDITIONAL(USE_INTERNAL_REGEX, test x$with_internalregex = xyes)
 AM_CONDITIONAL(CONFDEF, test x$dir_confdef = xyes)
@@ -357,6 +370,7 @@
 echo     "     ICU:              $with_icu"
 echo     "     ICUSWORD:         $with_icusword"
 echo     "     CURL:             $with_curl"
+echo     "     CURL SFTP:        $with_curl_sftp"
 echo     "     INTERNAL FTPLIB:  $with_internalftplib"
 echo     "     INTERNAL REGEX:   $with_internalregex"
 echo     "     CLUCENE:          $with_clucene"




More information about the sword-cvs mailing list