Add configure env flags to override jemalloc and libev clangs and libs
@@ -208,7 +208,11 @@ if test "${have_libnghttp3}" = "xno"; then
fi
AM_CONDITIONAL([HAVE_NGHTTP3], [ test "x${have_libnghttp3}" = "xyes" ])
+AC_ARG_VAR([LIBEV_CFLAGS], [C compiler flags for libev, skipping any checks])
+AC_ARG_VAR([LIBEV_LIBS], [linker flags for libev, skipping any checks])
+
# libev (for examples)
+if test "x${LIBEV_LIBS}" = "x" && test "x${LIBEV_CFLAGS}" = "x"; then
# libev does not have pkg-config file. Check it in an old way.
save_LIBS=$LIBS
# android requires -lm for floor
@@ -223,6 +227,9 @@ if test "x${have_libev}" = "xyes"; then
fi
fi
LIBS=$save_LIBS
+else
+ have_libev=yes
+fi
enable_examples=no
if test "x${lib_only}" = "xno" &&
@@ -233,9 +240,13 @@ fi
AM_CONDITIONAL([ENABLE_EXAMPLES], [ test "x${enable_examples}" = "xyes" ])
+AC_ARG_VAR([JEMALLOC_CFLAGS], [C compiler flags for jemalloc, skipping any checks])
+AC_ARG_VAR([JEMALLOC_LIBS], [linker flags for jemalloc, skipping any checks])
+
# jemalloc
have_jemalloc=no
if test "x${request_jemalloc}" != "xno"; then
+ if test "x${JEMALLOC_LIBS}" = "x" && test "x${JEMALLOC_CFLAGS}" = "x"; then
save_LIBS=$LIBS
AC_SEARCH_LIBS([malloc_stats_print], [jemalloc], [have_jemalloc=yes], [],
[$PTHREAD_LDFLAGS])
@@ -244,8 +255,8 @@ if test "x${request_jemalloc}" != "xno"; then
jemalloc_libs=${ac_cv_search_malloc_stats_print}
else
# On Darwin, malloc_stats_print is je_malloc_stats_print
- AC_SEARCH_LIBS([je_malloc_stats_print], [jemalloc], [have_jemalloc=yes], [],
- [$PTHREAD_LDFLAGS])
+ AC_SEARCH_LIBS([je_malloc_stats_print], [jemalloc], [have_jemalloc=yes],
+ [], [$PTHREAD_LDFLAGS])
if test "x${have_jemalloc}" = "xyes"; then
jemalloc_libs=${ac_cv_search_je_malloc_stats_print}
@@ -259,6 +270,9 @@ if test "x${request_jemalloc}" != "xno"; then
JEMALLOC_LIBS=${jemalloc_libs}
AC_SUBST([JEMALLOC_LIBS])
fi
+ else
+ have_jemalloc=yes
+ fi
fi
if test "x${request_jemalloc}" = "xyes" &&
