summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac11
1 files changed, 9 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 3a12a1a..ef300ad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,10 +29,17 @@ if test "x$cc_cv_attribute_alias" = "xyes"; then
AC_DEFINE([SUPPORT_ATTRIBUTE_ALIAS], 1, [Define this if the compiler supports the alias attribute])
fi
+dnl Grab the list of functions to test for from our template file.
+m4_define([funclist], [])
+m4_define([alias], [m4_if([$1],[na],[], [m4_append([funclist], [$3 ])])])
+m4_divert_push([KILL])
+m4_include([list.m4])
+m4_divert_pop([KILL])
+dnl Check which functions we need to provide aliases for.
PKG_CONFIG_LIBS=
-AC_CHECK_FUNCS([pthread_self pthread_mutex_init pthread_mutex_destroy pthread_mutex_lock pthread_mutex_unlock pthread_cond_init pthread_cond_destroy pthread_condattr_init pthread_condattr_destroy pthread_cond_wait pthread_cond_timedwait pthread_cond_signal pthread_cond_broadcast pthread_equal pthread_exit],
- [], [PKG_CONFIG_LIBS='-L${libdir} -lpthread-stubs'])
+AC_CHECK_FUNCS(funclist, [], [PKG_CONFIG_LIBS='-L${libdir} -lpthread-stubs'])
+
AC_SUBST([PKG_CONFIG_LIBS])
AM_CONDITIONAL(BUILD_LIB, test "x$PKG_CONFIG_LIBS" != x)