annotate srf2fastq/io_lib-1.12.2/acinclude.m4 @ 0:d901c9f41a6a default tip

Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
author dawe
date Tue, 07 Jun 2011 17:48:05 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
1 # LIBCURL_CHECK_CONFIG ([DEFAULT-ACTION], [MINIMUM-VERSION],
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
2 # [ACTION-IF-YES], [ACTION-IF-NO])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
3 # ----------------------------------------------------------
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
4 # David Shaw <dshaw@jabberwocky.com <mailto:dshaw@jabberwocky.com>> May-09-2006
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
5 # Modified by Rob to deal with curl-config linking against more libraries than
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
6 # strictly necessary.
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
7 #
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
8 # Checks for libcurl. DEFAULT-ACTION is the string yes or no to
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
9 # specify whether to default to --with-libcurl or --without-libcurl.
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
10 # If not supplied, DEFAULT-ACTION is yes. MINIMUM-VERSION is the
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
11 # minimum version of libcurl to accept. Pass the version as a regular
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
12 # version number like 7.10.1. If not supplied, any version is
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
13 # accepted. ACTION-IF-YES is a list of shell commands to run if
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
14 # libcurl was successfully found and passed the various tests.
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
15 # ACTION-IF-NO is a list of shell commands that are run otherwise.
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
16 # Note that using --without-libcurl does run ACTION-IF-NO.
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
17 #
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
18 # This macro #defines HAVE_LIBCURL if a working libcurl setup is
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
19 # found, and sets @LIBCURL@ and @LIBCURL_CPPFLAGS@ to the necessary
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
20 # values. Other useful defines are LIBCURL_FEATURE_xxx where xxx are
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
21 # the various features supported by libcurl, and LIBCURL_PROTOCOL_yyy
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
22 # where yyy are the various protocols supported by libcurl. Both xxx
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
23 # and yyy are capitalized. See the list of AH_TEMPLATEs at the top of
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
24 # the macro for the complete list of possible defines. Shell
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
25 # variables $libcurl_feature_xxx and $libcurl_protocol_yyy are also
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
26 # defined to 'yes' for those features and protocols that were found.
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
27 # Note that xxx and yyy keep the same capitalization as in the
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
28 # curl-config list (e.g. it's "HTTP" and not "http").
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
29 #
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
30 # Users may override the detected values by doing something like:
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
31 # LIBCURL="-lcurl" LIBCURL_CPPFLAGS="-I/usr/myinclude" ./configure
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
32 #
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
33 # For the sake of sanity, this macro assumes that any libcurl that is
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
34 # found is after version 7.7.2, the first version that included the
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
35 # curl-config script. Note that it is very important for people
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
36 # packaging binary versions of libcurl to include this script!
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
37 # Without curl-config, we can only guess what protocols are available,
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
38 # or use curl_version_info to figure it out at runtime.
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
39
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
40 AC_DEFUN([LIBCURL_CHECK_CONFIG],
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
41 [
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
42 AH_TEMPLATE([LIBCURL_FEATURE_SSL],[Defined if libcurl supports SSL])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
43 AH_TEMPLATE([LIBCURL_FEATURE_KRB4],[Defined if libcurl supports KRB4])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
44 AH_TEMPLATE([LIBCURL_FEATURE_IPV6],[Defined if libcurl supports IPv6])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
45 AH_TEMPLATE([LIBCURL_FEATURE_LIBZ],[Defined if libcurl supports libz])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
46 AH_TEMPLATE([LIBCURL_FEATURE_ASYNCHDNS],[Defined if libcurl supports AsynchDNS])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
47 AH_TEMPLATE([LIBCURL_FEATURE_IDN],[Defined if libcurl supports IDN])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
48 AH_TEMPLATE([LIBCURL_FEATURE_SSPI],[Defined if libcurl supports SSPI])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
49 AH_TEMPLATE([LIBCURL_FEATURE_NTLM],[Defined if libcurl supports NTLM])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
50
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
51 AH_TEMPLATE([LIBCURL_PROTOCOL_HTTP],[Defined if libcurl supports HTTP])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
52 AH_TEMPLATE([LIBCURL_PROTOCOL_HTTPS],[Defined if libcurl supports HTTPS])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
53 AH_TEMPLATE([LIBCURL_PROTOCOL_FTP],[Defined if libcurl supports FTP])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
54 AH_TEMPLATE([LIBCURL_PROTOCOL_FTPS],[Defined if libcurl supports FTPS])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
55 AH_TEMPLATE([LIBCURL_PROTOCOL_FILE],[Defined if libcurl supports FILE])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
56 AH_TEMPLATE([LIBCURL_PROTOCOL_TELNET],[Defined if libcurl supports TELNET])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
57 AH_TEMPLATE([LIBCURL_PROTOCOL_LDAP],[Defined if libcurl supports LDAP])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
58 AH_TEMPLATE([LIBCURL_PROTOCOL_DICT],[Defined if libcurl supports DICT])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
59 AH_TEMPLATE([LIBCURL_PROTOCOL_TFTP],[Defined if libcurl supports TFTP])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
60
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
61 AC_ARG_WITH(libcurl,
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
62 AC_HELP_STRING([--with-libcurl=DIR],[look for the curl library in DIR]),
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
63 [_libcurl_with=$withval],[_libcurl_with=ifelse([$1],,[yes],[$1])])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
64
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
65 if test "$_libcurl_with" != "no" ; then
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
66
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
67 AC_PROG_AWK
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
68
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
69 _libcurl_version_parse="eval $AWK '{split(\$NF,A,\".\"); X=256*256*A[[1]]+256*A[[2]]+A[[3]]; print X;}'"
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
70
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
71 _libcurl_try_link=yes
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
72
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
73 if test -d "$_libcurl_with" ; then
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
74 LIBCURL_CPPFLAGS="-I$withval/include"
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
75 _libcurl_ldflags="-L$withval/lib"
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
76 AC_PATH_PROG([_libcurl_config],["$withval/bin/curl-config"])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
77 else
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
78 AC_PATH_PROG([_libcurl_config],[curl-config])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
79 fi
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
80
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
81 if test x$_libcurl_config != "x" ; then
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
82 AC_CACHE_CHECK([for the version of libcurl],
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
83 [libcurl_cv_lib_curl_version],
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
84 [libcurl_cv_lib_curl_version=`$_libcurl_config --version | $AWK '{print $[]2}'`])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
85
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
86 _libcurl_version=`echo $libcurl_cv_lib_curl_version | $_libcurl_version_parse`
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
87 _libcurl_wanted=`echo ifelse([$2],,[0],[$2]) | $_libcurl_version_parse`
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
88
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
89 if test $_libcurl_wanted -gt 0 ; then
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
90 AC_CACHE_CHECK([for libcurl >= version $2],
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
91 [libcurl_cv_lib_version_ok],
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
92 [
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
93 if test $_libcurl_version -ge $_libcurl_wanted ; then
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
94 libcurl_cv_lib_version_ok=yes
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
95 else
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
96 libcurl_cv_lib_version_ok=no
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
97 fi
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
98 ])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
99 fi
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
100
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
101 if test $_libcurl_wanted -eq 0 || test x$libcurl_cv_lib_version_ok = xyes ; then
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
102 if test x"$LIBCURL_CPPFLAGS" = "x" ; then
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
103 LIBCURL_CPPFLAGS=`$_libcurl_config --cflags`
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
104 fi
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
105 if test x"$LIBCURL" = "x" ; then
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
106 # libcurl-config --libs gives a ridiculous number of libraries
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
107 # check to see if we can actually link just using -lcurl
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
108
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
109 LIBCURL=${LIBCURL-"$_libcurl_ldflags -lcurl"}
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
110
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
111 AC_CACHE_CHECK([whether libcurl just needs -lcurl],
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
112 [libcurl_cv_lib_curl_only_needs_minus_l_curl],
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
113 [
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
114 _libcurl_save_cppflags=$CPPFLAGS
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
115 CPPFLAGS="$LIBCURL_CPPFLAGS $CPPFLAGS"
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
116 _libcurl_save_libs=$LIBS
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
117 LIBS="$LIBCURL $LIBS"
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
118
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
119 AC_LINK_IFELSE(AC_LANG_PROGRAM([#include <curl/curl.h>],[
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
120 /* Try and use a few common options to force a failure if we are
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
121 missing symbols or can't link. */
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
122 int x;
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
123 curl_easy_setopt(NULL,CURLOPT_URL,NULL);
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
124 x=CURL_ERROR_SIZE;
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
125 x=CURLOPT_WRITEFUNCTION;
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
126 x=CURLOPT_FILE;
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
127 x=CURLOPT_ERRORBUFFER;
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
128 x=CURLOPT_STDERR;
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
129 x=CURLOPT_VERBOSE;
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
130 ]),libcurl_cv_lib_curl_only_needs_minus_l_curl=yes,libcurl_cv_lib_curl_only_needs_minus_l_curl=no)
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
131
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
132 CPPFLAGS=$_libcurl_save_cppflags
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
133 LIBS=$_libcurl_save_libs
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
134 unset _libcurl_save_cppflags
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
135 unset _libcurl_save_libs
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
136 ])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
137
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
138
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
139 if test "x$libcurl_cv_lib_curl_only_needs_minus_l_curl" != xyes ; then
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
140 LIBCURL=`$_libcurl_config --libs`
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
141 fi
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
142
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
143 # This is so silly, but Apple actually has a bug in their
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
144 # curl-config script. Fixed in Tiger, but there are still
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
145 # lots of Panther installs around.
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
146 case "${host}" in
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
147 powerpc-apple-darwin7*)
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
148 LIBCURL=`echo $LIBCURL | sed -e 's|-arch i386||g'`
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
149 ;;
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
150 esac
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
151 fi
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
152
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
153 # All curl-config scripts support --feature
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
154 _libcurl_features=`$_libcurl_config --feature`
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
155
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
156 # Is it modern enough to have --protocols? (7.12.4)
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
157 if test $_libcurl_version -ge 461828 ; then
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
158 _libcurl_protocols=`$_libcurl_config --protocols`
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
159 fi
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
160 else
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
161 _libcurl_try_link=no
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
162 fi
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
163
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
164 unset _libcurl_wanted
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
165 fi
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
166
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
167 if test $_libcurl_try_link = yes ; then
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
168
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
169 # we didn't find curl-config, so let's see if the user-supplied
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
170 # link line (or failing that, "-lcurl") is enough.
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
171 LIBCURL=${LIBCURL-"$_libcurl_ldflags -lcurl"}
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
172
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
173 AC_CACHE_CHECK([whether libcurl is usable],
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
174 [libcurl_cv_lib_curl_usable],
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
175 [
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
176 _libcurl_save_cppflags=$CPPFLAGS
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
177 CPPFLAGS="$LIBCURL_CPPFLAGS $CPPFLAGS"
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
178 _libcurl_save_libs=$LIBS
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
179 LIBS="$LIBCURL $LIBS"
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
180
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
181 AC_LINK_IFELSE(AC_LANG_PROGRAM([#include <curl/curl.h>],[
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
182 /* Try and use a few common options to force a failure if we are
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
183 missing symbols or can't link. */
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
184 int x;
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
185 curl_easy_setopt(NULL,CURLOPT_URL,NULL);
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
186 x=CURL_ERROR_SIZE;
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
187 x=CURLOPT_WRITEFUNCTION;
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
188 x=CURLOPT_FILE;
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
189 x=CURLOPT_ERRORBUFFER;
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
190 x=CURLOPT_STDERR;
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
191 x=CURLOPT_VERBOSE;
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
192 ]),libcurl_cv_lib_curl_usable=yes,libcurl_cv_lib_curl_usable=no)
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
193
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
194 CPPFLAGS=$_libcurl_save_cppflags
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
195 LIBS=$_libcurl_save_libs
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
196 unset _libcurl_save_cppflags
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
197 unset _libcurl_save_libs
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
198 ])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
199
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
200 if test $libcurl_cv_lib_curl_usable = yes ; then
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
201
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
202 # Does curl_free() exist in this version of libcurl?
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
203 # If not, fake it with free()
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
204
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
205 _libcurl_save_cppflags=$CPPFLAGS
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
206 CPPFLAGS="$CPPFLAGS $LIBCURL_CPPFLAGS"
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
207 _libcurl_save_libs=$LIBS
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
208 LIBS="$LIBS $LIBCURL"
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
209
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
210 AC_CHECK_FUNC(curl_free,,
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
211 AC_DEFINE(curl_free,free,
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
212 [Define curl_free() as free() if our version of curl lacks curl_free.]))
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
213
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
214 CPPFLAGS=$_libcurl_save_cppflags
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
215 LIBS=$_libcurl_save_libs
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
216 unset _libcurl_save_cppflags
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
217 unset _libcurl_save_libs
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
218
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
219 AC_DEFINE(HAVE_LIBCURL,1,
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
220 [Define to 1 if you have a functional curl library.])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
221 AC_SUBST(LIBCURL_CPPFLAGS)
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
222 AC_SUBST(LIBCURL)
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
223
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
224 for _libcurl_feature in $_libcurl_features ; do
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
225 AC_DEFINE_UNQUOTED(AS_TR_CPP(libcurl_feature_$_libcurl_feature),[1])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
226 eval AS_TR_SH(libcurl_feature_$_libcurl_feature)=yes
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
227 done
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
228
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
229 if test "x$_libcurl_protocols" = "x" ; then
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
230
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
231 # We don't have --protocols, so just assume that all
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
232 # protocols are available
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
233 _libcurl_protocols="HTTP FTP FILE TELNET LDAP DICT"
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
234
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
235 if test x$libcurl_feature_SSL = xyes ; then
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
236 _libcurl_protocols="$_libcurl_protocols HTTPS"
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
237
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
238 # FTPS wasn't standards-compliant until version
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
239 # 7.11.0
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
240 if test $_libcurl_version -ge 461568; then
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
241 _libcurl_protocols="$_libcurl_protocols FTPS"
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
242 fi
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
243 fi
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
244 fi
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
245
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
246 for _libcurl_protocol in $_libcurl_protocols ; do
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
247 AC_DEFINE_UNQUOTED(AS_TR_CPP(libcurl_protocol_$_libcurl_protocol),[1])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
248 eval AS_TR_SH(libcurl_protocol_$_libcurl_protocol)=yes
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
249 done
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
250 else
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
251 unset LIBCURL
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
252 unset LIBCURL_CPPFLAGS
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
253 fi
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
254 fi
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
255
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
256 unset _libcurl_try_link
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
257 unset _libcurl_version_parse
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
258 unset _libcurl_config
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
259 unset _libcurl_feature
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
260 unset _libcurl_features
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
261 unset _libcurl_protocol
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
262 unset _libcurl_protocols
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
263 unset _libcurl_version
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
264 unset _libcurl_ldflags
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
265 fi
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
266
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
267 if test x$_libcurl_with = xno || test x$libcurl_cv_lib_curl_usable != xyes ; then
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
268 # This is the IF-NO path
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
269 ifelse([$4],,:,[$4])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
270 else
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
271 # This is the IF-YES path
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
272 ifelse([$3],,:,[$3])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
273 fi
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
274
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
275 unset _libcurl_with
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
276 ])dnl
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
277
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
278 # ZLIB_CHECK_CONFIG ([DEFAULT-ACTION] [MINIMUM-VERSION],
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
279 # [ACTION-IF-YES], [ACTION-IF-NO])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
280 #
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
281 AC_DEFUN([ZLIB_CHECK_CONFIG],
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
282 [
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
283 AC_ARG_WITH(zlib,
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
284 AC_HELP_STRING([--with-zlib=DIR],[look for zlib in DIR]),
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
285 [_zlib_with=$withval],[_zlib_with="no"])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
286
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
287 ZLIB_ROOT=""
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
288 if test "$_zlib_with" != "no"
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
289 then
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
290 if test -f "$_zlib_with/include/zlib.h"
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
291 then
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
292 ZLIB_ROOT=$_zlib_with
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
293 fi
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
294 fi
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
295
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
296 # Check if it's a working library
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
297 zlib_ok=no
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
298 if test "$ZLIB_ROOT" != ""
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
299 then
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
300 _cppflags=$CPPFLAGS
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
301 CPPFLAGS="$CPPFLAGS -I${ZLIB_ROOT}/include"
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
302 _ldflags=$LDFLAGS
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
303 LDFLAGS="$LFDLAGS -L${ZLIB_ROOT}/lib"
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
304 AC_LANG_SAVE
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
305 AC_LANG_C
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
306 AC_CHECK_LIB(z, inflateEnd,
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
307 [AC_CHECK_HEADER(zlib.h, zlib_ok=yes, zlib_ok=no)])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
308 AC_LANG_RESTORE
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
309 if test "$zlib_ok" != "yes"
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
310 then
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
311 # Backout and whinge
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
312 CPPFLAGS=$_cppflags
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
313 LDFLAGS=$_ldflags
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
314 AC_MSG_WARN("--with-zlib specified, but non functioning")
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
315 fi
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
316
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
317 else
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
318 # Maybe it works "out of the box"?
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
319 AC_CHECK_LIB(z, inflateEnd,
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
320 [AC_CHECK_HEADER(zlib.h, zlib_ok=yes, zlib_ok=no)])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
321 fi
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
322
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
323 if test "$zlib_ok" = "yes"
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
324 then
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
325 AC_DEFINE(HAVE_ZLIB, 1,
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
326 [Define to 1 if you have a functional libz.])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
327 if test "$ZLIB_ROOT" != ""
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
328 then
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
329 LIBZ="-L${ZLIB_ROOT}/lib -lz"
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
330 else
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
331 LIBZ=-lz
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
332 fi
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
333 AC_SUBST(LIBZ)
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
334 else
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
335 AC_MSG_WARN("No functioning zlib found")
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
336 fi
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
337
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
338 # Not sure how many of these are needed, but it's belt-and-braces mode
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
339 AH_TEMPLATE([HAVE_ZLIB], [Define if zlib is installed])
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
340 AM_CONDITIONAL(HAVE_ZLIB, test "$zlib_ok" = "yes")
d901c9f41a6a Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
dawe
parents:
diff changeset
341 ])