File: configure.ac

package info (click to toggle)
esniper 2.35.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 656 kB
  • sloc: ansic: 4,819; sh: 1,061; makefile: 14
file content (50 lines) | stat: -rw-r--r-- 1,237 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
AC_INIT(esniper,2.35.0)
AC_CONFIG_SRCDIR(esniper.c)
AM_INIT_AUTOMAKE

AC_PROG_CC
AC_PROG_MAKE_SET

AC_ARG_WITH(curl-config, [  --with-curl-config=PATH Location of libcurl curl-config []], curl_config="$withval", curl_config="curl-config")

if test -f $curl_config ; then
  CURL_CONFIG=$curl_config
  AC_MSG_RESULT(yes)
else				dnl check in path
  AC_CHECK_PROGS(CURL_CONFIG, curl-config)
fi

if test "X$CURL_CONFIG" = "X"; then
  AC_MSG_ERROR($curl_config not found.
cURL is available from http://curl.haxx.se/)
fi

CURLCFLAGS="`$CURL_CONFIG --cflags`"
CURLLIBS=`$CURL_CONFIG --libs`
AC_SUBST(CURLCFLAGS)
AC_SUBST(CURLLIBS)
CFLAGS="$CURLCFLAGS $CFLAGS"
LIBS="$CURLLIBS $LIBS"

dnl check version curl_easy were added in 7.1.1
check_min=7.1.1

AC_CHECK_FUNC(curl_easy_setopt, 
		   [],
		   AC_MSG_ERROR([cURL $check_min or newer required \
(cURL is available from http://curl.haxx.se/)]))

AC_CHECK_FUNC(curl_easy_strerror, 
		   [],
		   CURLCFLAGS="$CURLCFLAGS -D NEED_CURL_EASY_STRERROR")

dnl check for curl SSL support
AC_MSG_CHECKING(for cURL SSL support)
if test XSSL != X`$CURL_CONFIG --feature|grep SSL`; then
  AC_MSG_ERROR([no SSL
cURL is available from http://curl.haxx.se/])
else
  AC_MSG_RESULT(yes)
fi

AC_OUTPUT(Makefile)