2 dnl Check for platform specific features and define some variables
4 dnl GST_EXTRA_MODULE_SUFFIX: contains a platform specific
5 dnl extra module suffix additional to G_MODULE_SUFFIX
7 dnl HAVE_OSX: Defined if compiling for OS X
9 dnl GST_HAVE_UNSAFE_FORK: Defined if fork is unsafe (Windows)
11 dnl HAVE_WIN32: Defined if compiling on Win32
14 AC_DEFUN([AG_GST_PLATFORM],
16 AC_REQUIRE([AC_CANONICAL_HOST])
20 AC_DEFINE_UNQUOTED(GST_EXTRA_MODULE_SUFFIX, [".dylib"], [Extra platform specific plugin suffix])
23 AC_DEFINE_UNQUOTED(GST_EXTRA_MODULE_SUFFIX, [".dylib"], [Extra platform specific plugin suffix])
24 AC_DEFINE_UNQUOTED(HAVE_OSX, 1, [Defined if compiling for OSX])
27 AC_DEFINE_UNQUOTED(GST_HAVE_UNSAFE_FORK, 1, [Defined when registry scanning through fork is unsafe])
29 mingw* | msvc* | mks*)
30 dnl HAVE_WIN32 currently means "disable POSIXisms".
31 AC_DEFINE_UNQUOTED(HAVE_WIN32, 1, [Defined if compiling for Windows])
33 dnl define __MSVCRT_VERSION__ version if not set already by the
34 dnl compiler (ie. mostly for mingw). This is needed for things like
35 dnl __stat64 to be available. If set by the compiler, ensure it's
36 dnl new enough - we need at least WinXP SP2.
37 AC_TRY_COMPILE([ ], [ return __MSVCRT_VERSION__; ], [
39 #if __MSVCRT_VERSION__ < 0x0601
40 #error "MSVCRT too old"
43 AC_MSG_NOTICE([MSVCRT version looks ok])
45 AC_MSG_ERROR([MSVCRT version too old, need at least WinXP SP2])
48 AC_MSG_NOTICE([Setting MSVCRT version to 0x0601])
49 AC_DEFINE_UNQUOTED(__MSVCRT_VERSION__, 0x0601, [We need at least WinXP SP2 for __stat64])
57 AC_DEFUN([AG_GST_LIBTOOL_PREPARE],
59 dnl Persuade libtool to also link (-l) a 'pure' (DirectX) static lib,
60 dnl i.e. as opposed to only import lib with dll counterpart.
61 dnl Needs to be tweaked before libtool's checks.
64 lt_cv_deplibs_check_method=pass_all