This is the switch that turns on the patchset via the config.h macro ENABLE_POSIX_SYNC.
Signed-off-by: Daniel Santos daniel.santos@pobox.com --- configure | 34 ++++++++++++++++++++++++++++++++++ configure.ac | 12 ++++++++++++ include/config.h.in | 6 ++++++ 3 files changed, 52 insertions(+)
diff --git a/configure b/configure index 20371dc..097b689 100755 --- a/configure +++ b/configure @@ -800,6 +800,7 @@ enable_win16 enable_win64 enable_tests enable_maintainer_mode +enable_hybrid_sync with_alsa with_capi with_cms @@ -2155,6 +2156,8 @@ Optional Features: --disable-tests do not build the regression tests --enable-maintainer-mode enable maintainer-specific build rules + --enable-hybrid-sync enable hybrid of server-side and process local + synchronisation objects (experimental) --disable-largefile omit support for large files
Optional Packages: @@ -3260,6 +3263,11 @@ if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; fi
+# Check whether --enable-hybrid-sync was given. +if test "${enable_hybrid_sync+set}" = set; then : + enableval=$enable_hybrid_sync; +fi +
# Check whether --with-alsa was given. @@ -7057,6 +7065,32 @@ fi done
+for ac_header in semaphore.h +do : + ac_fn_c_check_header_compile "$LINENO" "semaphore.h" "ac_cv_header_semaphore_h" "#ifdef HAVE_SEMAPHORE_H +#include <semaphore.h> +#endif +" +if test "x$ac_cv_header_semaphore_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SEMAPHORE_H 1 +_ACEOF + +fi + +done + + +enable_posix_sync=0 +if test "x$enable_hybrid_sync" = "xyes" +then + +cat >>confdefs.h <<_ACEOF +#define ENABLE_POSIX_SYNC 1 +_ACEOF + +fi + for ac_header in linux/videodev.h linux/videodev2.h libv4l1.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` diff --git a/configure.ac b/configure.ac index 1173190..e07ddf8 100644 --- a/configure.ac +++ b/configure.ac @@ -32,6 +32,7 @@ AC_ARG_ENABLE(win16, AS_HELP_STRING([--disable-win16],[do not include Win16 supp AC_ARG_ENABLE(win64, AS_HELP_STRING([--enable-win64],[build a Win64 emulator on AMD64 (won't run Win32 binaries)])) AC_ARG_ENABLE(tests, AS_HELP_STRING([--disable-tests],[do not build the regression tests])) AC_ARG_ENABLE(maintainer-mode, AS_HELP_STRING([--enable-maintainer-mode],[enable maintainer-specific build rules])) +AC_ARG_ENABLE(hybrid-sync, AS_HELP_STRING([--enable-hybrid-sync],[enable hybrid of server-side and process local synchronisation objects (experimental)]))
AC_ARG_WITH(alsa, AS_HELP_STRING([--without-alsa],[do not use the Alsa sound support]), [if test "x$withval" = "xno"; then ac_cv_header_sys_asoundlib_h=no; ac_cv_header_alsa_asoundlib_h=no; fi]) @@ -650,6 +651,17 @@ AC_CHECK_HEADERS([pthread_np.h],,, #include <pthread.h> #endif])
+AC_CHECK_HEADERS([semaphore.h],,, +[#ifdef HAVE_SEMAPHORE_H +#include <semaphore.h> +#endif]) + +enable_posix_sync=0 +if test "x$enable_hybrid_sync" = "xyes" +then + AC_DEFINE_UNQUOTED(ENABLE_POSIX_SYNC, 1, [Define to 1 to enable hybrid synchronization.]) +fi + AC_CHECK_HEADERS([linux/videodev.h linux/videodev2.h libv4l1.h],,, [#ifdef HAVE_SYS_TIME_H #include <sys/time.h> diff --git a/include/config.h.in b/include/config.h.in index eb61a94..6615a98 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -7,6 +7,9 @@ /* Define to a function attribute for Microsoft hotpatch assembly prefix. */ #undef DECLSPEC_HOTPATCH
+/* Define to 1 to enable hybrid synchronization. */ +#undef ENABLE_POSIX_SYNC + /* Define to the file extension for executables. */ #undef EXEEXT
@@ -759,6 +762,9 @@ /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT
+/* Define to 1 if you have the <semaphore.h> header file. */ +#undef HAVE_SEMAPHORE_H + /* Define to 1 if you have the `sendmsg' function. */ #undef HAVE_SENDMSG