-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.librb-http
48 lines (39 loc) · 2.17 KB
/
configure.librb-http
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
#!/bin/bash
mkl_require good_cflags
mkl_require lib
mkl_require pic
mkl_require atomics must pass
mkl_require good_cflags
mkl_require socket
mkl_require gitversion as GITVERSION
mkl_mkvar_append CPPFLAGS CPPFLAGS "-fPIC"
mkl_mkvar_append CPPFLAGS CPPFLAGS "-DFORTIFY_SOURCE=2"
mkl_mkvar_append CPPFLAGS CPPFLAGS "-DNDEBUG"
mkl_mkvar_append CPPFLAGS CPPFLAGS "-Wunused -Wcast-qual -Wextra -Wsign-conversion -Wshadow"
#mkl_mkvar_append CPPFLAGS CPPFLAGS "-ftrack-macro-expansion=2" # Not in gcc 4.4
#mkl_mkvar_append CPPFLAGS CPPFLAGS "-Wjump-misses-init" # New in gcc 4.5
#mkl_mkvar_append CPPFLAGS CPPFLAGS "-Wdouble-promotion" # New in gcc 4.6
#mkl_mkvar_append CPPFLAGS CPPFLAGS "-Wunused-local-typedefs" # New in gcc 4.7
mkl_mkvar_append CPPFLAGS CPPFLAGS "-Wcast-align -Wdisabled-optimization -Winit-self -Wlogical-op"
mkl_mkvar_append CPPFLAGS CPPFLAGS "-Wmissing-include-dirs -Wstrict-overflow=5 -Wundef -Wswitch-default"
mkl_mkvar_append CPPFLAGS CPPFLAGS "-Wmissing-declarations -Wdisabled-optimization"
function checks {
# Check that libcurl is available, and allow to link it statically.
mkl_meta_set "lcurl" "desc" "Free and easy-to-use client-side URL transfer library"
mkl_meta_set "lcurl" "deb" "libcurl4-gnutls-dev"
mkl_lib_check --static=-lcurl "libcurl" "" fail CC "-lcurl -lpthread -lz" \
"#include <curl/curl.h>"
mkl_lib_check "libm" "" fail CC "-lm"
mkl_lib_check "libpthread" "" fail CC "-lpthread"
# Check libcurl is new enough
mkl_meta_set "curlversion" "name" "libcurl MAX_TOTAL_CONNECTIONS"
mkl_meta_set "curlversion" "desc" "libcurl 7.45.0 or later is required for the Max connections option"
mkl_compile_check "curlversion" "" fail CC "" \
"#include <curl/curl.h>
static int foo __attribute__((unused)) = CURLMOPT_MAX_TOTAL_CONNECTIONS;"
# Check that librd is available, and allow to link it statically.
mkl_meta_set "librd" "desc" "Magnus Edenhill's librd is available at http://github.com/edenhill/librd"
mkl_lib_check --static=-lrd "librd" "" fail CC "-lrd -lpthread -lz -lrt" \
"#include <librd/rd.h>"
mkl_in_list "$*" "--disable-optimization" || mkl_mkvar_append CPPFLAGS CPPFLAGS "-DNDEBUG"
}