142941e3bSmrg#  Copyright 2005 Red Hat, Inc.
242941e3bSmrg#
342941e3bSmrg#  Permission to use, copy, modify, distribute, and sell this software and its
442941e3bSmrg#  documentation for any purpose is hereby granted without fee, provided that
542941e3bSmrg#  the above copyright notice appear in all copies and that both that
642941e3bSmrg#  copyright notice and this permission notice appear in supporting
742941e3bSmrg#  documentation, and that the name of Red Hat not be used in
842941e3bSmrg#  advertising or publicity pertaining to distribution of the software without
942941e3bSmrg#  specific, written prior permission.  Red Hat makes no
1042941e3bSmrg#  representations about the suitability of this software for any purpose.  It
1142941e3bSmrg#  is provided "as is" without express or implied warranty.
1242941e3bSmrg#
1342941e3bSmrg#  RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
1442941e3bSmrg#  INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
1542941e3bSmrg#  EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
1642941e3bSmrg#  CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
1742941e3bSmrg#  DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
1842941e3bSmrg#  TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1942941e3bSmrg#  PERFORMANCE OF THIS SOFTWARE.
2042941e3bSmrg#
2142941e3bSmrg
2242941e3bSmrg# Initialize Autoconf
23356f6debSmrgAC_PREREQ([2.60])
240f57e2e1SmrgAC_INIT([libXvMC], [1.0.14],
250f57e2e1Smrg	[https://gitlab.freedesktop.org/xorg/lib/libxvmc/-/issues], [libXvMC])
2642941e3bSmrgAC_CONFIG_SRCDIR([Makefile.am])
2742941e3bSmrgAC_CONFIG_HEADERS([config.h])
280f57e2e1SmrgAC_CONFIG_MACRO_DIRS([m4])
296f03b1f6Smrg
3042941e3bSmrg# Initialize Automake
3140613eb2SmrgAM_INIT_AUTOMAKE([foreign dist-xz])
326f03b1f6Smrg
3342941e3bSmrg# Initialize libtool
340f57e2e1SmrgLT_INIT
3542941e3bSmrg
3642941e3bSmrg# Require X.Org macros 1.8 or later for AC_PROG_INSTALL
37356f6debSmrgm4_ifndef([XORG_MACROS_VERSION],
3842941e3bSmrg          [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
3942941e3bSmrgXORG_MACROS_VERSION(1.8)
40356f6debSmrgXORG_DEFAULT_OPTIONS
4142941e3bSmrgXORG_CHECK_MALLOC_ZERO
426f03b1f6Smrg
4340613eb2Smrg# Obtain compiler/linker options for dependencies
44dcbf891fSmrgPKG_CHECK_MODULES(XVMC, [x11 >= 1.6] xext xv xextproto videoproto)
4517caa701Smrg
4642941e3bSmrg# Checks for library functions.
4742941e3bSmrgAC_CHECK_FUNCS([shmat])
486f03b1f6Smrg
49dcbf891fSmrg# Check to see if dlopen is in default libraries (like Solaris, which
50dcbf891fSmrg# has it in libc), or if libdl is needed to get it.
51dcbf891fSmrgAC_CHECK_FUNC([dlopen], [],
52dcbf891fSmrg	AC_CHECK_LIB([dl], [dlopen], DLOPEN_LIBS="-ldl"))
53dcbf891fSmrgAC_SUBST(DLOPEN_LIBS)
54dcbf891fSmrg
5542941e3bSmrg# Allow checking code with lint, sparse, etc.
566f03b1f6SmrgXORG_WITH_LINT
576f03b1f6SmrgLINT_FLAGS="${LINT_FLAGS} ${XVMC_CFLAGS}"
586f03b1f6Smrg
5942941e3bSmrgAC_CONFIG_FILES([Makefile
6042941e3bSmrg		include/Makefile
6142941e3bSmrg		include/X11/Makefile
6242941e3bSmrg		include/X11/extensions/Makefile
6342941e3bSmrg		src/Makefile
6442941e3bSmrg		wrapper/Makefile
65cfcf9057Smrg		xvmc.pc
66cfcf9057Smrg		xvmc-wrapper.pc])
6742941e3bSmrgAC_OUTPUT
68