| 1 |
AC_DEFUN([AC_FLMSG_NP_COMPAT], [ |
| 2 |
AC_REQUIRE([AC_FL_MACOSX]) |
| 3 |
AC_REQUIRE([AC_FL_WIN32]) |
| 4 |
|
| 5 |
AC_ARG_WITH([clock_gettime], |
| 6 |
AC_HELP_STRING([--without-clock_gettime], [Do not use clock_gettime lib]), |
| 7 |
[case "${withval}" in |
| 8 |
yes|no) ac_cv_with_clock_gettime="${withval}" ;; |
| 9 |
*) AC_MSG_ERROR([bad value ${withval} for --without-clock_gettime]) ;; |
| 10 |
esac], |
| 11 |
[ac_cv_with_clock_gettime=yes]) |
| 12 |
|
| 13 |
if test "x$ac_cv_with_clock_gettime" = "xyes"; then |
| 14 |
AC_FLMSG_SEARCH_LIBS([clock_gettime], [rt], [$other_libs]) |
| 15 |
fi |
| 16 |
|
| 17 |
AM_CONDITIONAL([COMPAT_REGEX], [test "x$ac_cv_header_regex_h" != "xyes"]) |
| 18 |
|
| 19 |
if test "x$target_mingw32" = "xyes"; then |
| 20 |
sem_libs="pthreadGC2" |
| 21 |
else |
| 22 |
sem_libs="pthread rt" |
| 23 |
fi |
| 24 |
other_libs="" |
| 25 |
|
| 26 |
if test "x$ac_cv_want_ptw32" = "xyes"; then |
| 27 |
CFLAGS_saved="$CFLAGS" |
| 28 |
LDFLAGS_saved="$LDFLAGS" |
| 29 |
EXTRA_LIBS_saved="$EXTRA_LIBS" |
| 30 |
CFLAGS="$CFLAGS $PTW32_CFLAGS" |
| 31 |
LDFLAGS="$LDFLAGS $PTW32_LIBS" |
| 32 |
other_libs=-lws2_32 |
| 33 |
fi |
| 34 |
|
| 35 |
AC_FLMSG_SEARCH_LIBS([dlopen], [dl], [$other_libs]) |
| 36 |
AC_FLMSG_SEARCH_LIBS([sem_unlink], [$sem_libs], [$other_libs]) |
| 37 |
AC_FLMSG_SEARCH_LIBS([sem_timedwait], [$sem_libs], [$other_libs]) |
| 38 |
|
| 39 |
if test "x$ac_cv_want_ptw32" = "xyes"; then |
| 40 |
CFLAGS="$CFLAGS_saved" |
| 41 |
LDFLAGS="$LDFLAGS_saved" |
| 42 |
EXTRA_LIBS="$EXTRA_LIBS_saved" |
| 43 |
fi |
| 44 |
AC_SUBST([EXTRA_LIBS]) |
| 45 |
|
| 46 |
AM_CONDITIONAL([COMPAT_STRCASESTR], [test "x$ac_cv_func_strcasestr" != "xyes"]) |
| 47 |
]) |