Debian Codegraph @

m4/np-compat.m4

raw
1 AC_DEFUN([AC_FL_NP_COMPAT], [
2 AC_REQUIRE([AC_FL_MACOSX])
3 AC_REQUIRE([AC_FL_WIN32])
4
5 AM_CONDITIONAL([COMPAT_REGEX], [test "x$ac_cv_header_regex_h" != "xyes"])
6
7 if test "x$target_mingw32" = "xyes"; then
8 sem_libs="pthreadGC2"
9 else
10 sem_libs="pthread rt"
11 fi
12 other_libs=""
13
14 if test "x$ac_cv_want_ptw32" = "xyes"; then
15 CFLAGS_saved="$CFLAGS"
16 LDFLAGS_saved="$LDFLAGS"
17 EXTRA_LIBS_saved="$EXTRA_LIBS"
18 CFLAGS="$CFLAGS $PTW32_CFLAGS"
19 LDFLAGS="$LDFLAGS $PTW32_LIBS"
20 other_libs=-lws2_32
21 fi
22
23 AC_FL_SEARCH_LIBS([dlopen], [dl], [$other_libs])
24 AC_FL_SEARCH_LIBS([clock_gettime], [rt], [$other_libs])
25 AC_FL_SEARCH_LIBS([sem_unlink], [$sem_libs], [$other_libs])
26 AC_FL_SEARCH_LIBS([sem_timedwait], [$sem_libs], [$other_libs])
27
28 if test "x$ac_cv_want_ptw32" = "xyes"; then
29 CFLAGS="$CFLAGS_saved"
30 LDFLAGS="$LDFLAGS_saved"
31 EXTRA_LIBS="$EXTRA_LIBS_saved"
32 fi
33 AC_SUBST([EXTRA_LIBS])
34
35 AM_CONDITIONAL([COMPAT_STRCASESTR], [test "x$ac_cv_func_strcasestr" != "xyes"])
36 ])