?RCS: $Id: gnutlsconfig.U 9173 2005-08-14 12:33:32Z rmanfredi $ ?RCS: ?RCS: @COPYRIGHT@ ?RCS: ?MAKE:gnutlsconfig gnutlscflags gnutlsldflags d_gnutls: awk cat Myread Setvar ?MAKE: -pick add $@ %< ?S:d_gnutls: ?S: This variable determines if HAS_GNUTLS will be defined. ?S:. ?S:gnutlsconfig: ?S: This variable holds the command to use to grab information ?S: about GNU TLS. ?S: Typically something "pkg-config gnutls". ?S:. ?S:gnutlscflags: ?S: This variable holds the compiler flags required to compile with GNU TLS. ?S:. ?S:gnutlsldflags: ?S: This variable holds the linker flags required to link against GNU TLS. ?S:. ?C:HAS_GNUTLS: ?C: This symbol is defined when GNU TLS is present ?C:. ?H:#$d_gnutls HAS_GNUTLS /**/ ?H:. ?T:modver version vint gnutls ?LINT: set d_gnutls : how can we find information about GNU TLS? echo " " case "$d_gnutls" in "$undef") gnutls="$undef";; *) gnutls="$define";; esac echo "Checking how we can gather information about GNU TLS..." >&4 if pkg-config gnutls --cflags >/dev/null 2>&1; then gnutlsconfig="pkg-config gnutls" modver=--modversion elif libgnutls-config --cflags >/dev/null 2>&1; then gnutlsconfig="libgnutls-config" modver=--version else echo "You've don't seem to have GNU TLS installed?" >&4 gnutlsconfig='false' modver='' fi echo "(I'll use '$gnutlsconfig' to gather that information.)" ?X: Make sure we have a good enough version gnutlscflags="" gnutlsldflags="" version=`$gnutlsconfig $modver` val="$undef" case "$version" in '') ;; *) gnutlscflags=`$gnutlsconfig --cflags` gnutlsldflags=`$gnutlsconfig --libs` vint=`echo $version | $awk -F. '{print $1 * 10000 + $2 * 100 + $3;}'` if test 0$vint -lt 010016; then echo "Sorry, you have GNU TLS $version, I need at least 1.0.16." >&4 else echo "Good, you have GNU TLS $version." $cat <<'EOM' GNU TLS allows encryption of downloads, uploads and Gnutella connections. For more information, see http://www.gnu.org/software/gnutls/. EOM case "$gnutls" in "$define") dflt=y;; *) dflt=n;; esac rp="Enable GNU TLS support" . ./myread case "$ans" in y) val="$define";; *) val="$undef";; esac fi ;; esac set d_gnutls eval $setvar