1 dnl ** Additional Autoconf tests for BIRD configure script
2 dnl ** (c) 1999 Martin Mares <mj@ucw.cz>
4 AC_DEFUN([BIRD_CHECK_PTHREADS],
6 bird_tmp_cflags="$CFLAGS"
7 CFLAGS="$CFLAGS -pthread"
10 [whether POSIX threads are available],
11 [bird_cv_lib_pthreads],
16 [ #include <pthread.h> ],
19 pthread_create(&pt, NULL, NULL, NULL);
20 pthread_spinlock_t lock;
21 pthread_spin_lock(&lock);
25 [bird_cv_lib_pthreads=yes],
26 [bird_cv_lib_pthreads=no]
31 CFLAGS="$bird_tmp_cflags"
34 AC_DEFUN([BIRD_CHECK_ANDROID_GLOB],
45 [ glob(NULL, 0, NULL, NULL); ]
48 [bird_cv_lib_glob=yes],
51 LIBS="$LIBS -landroid-glob"
58 [ glob(NULL, 0, NULL, NULL); ]
61 [bird_cv_lib_glob=-landroid-glob],
70 AC_DEFUN([BIRD_CHECK_ANDROID_LOG],
73 [for syslog lib flags],
77 [ #include <sys/syslog.h> ],
81 [bird_cv_lib_log=yes],
87 [ #include <sys/syslog.h> ],
91 [bird_cv_lib_log=-llog],
100 AC_DEFUN([BIRD_CHECK_GCC_OPTION],
102 bird_tmp_cflags="$CFLAGS"
106 [whether CC supports $2],
117 CFLAGS="$bird_tmp_cflags"
120 AC_DEFUN([BIRD_ADD_GCC_OPTION],
122 if test "$$1" = yes ; then
127 # BIRD_CHECK_PROG_FLAVOR_GNU(PROGRAM-PATH, IF-SUCCESS, [IF-FAILURE])
128 # copied from autoconf internal _AC_PATH_PROG_FLAVOR_GNU
129 AC_DEFUN([BIRD_CHECK_PROG_FLAVOR_GNU],
132 case `"$1" --version 2>&1` in