2013-10-29 23:21:40 -07:00
|
|
|
# -*- Autoconf -*-
|
|
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
|
|
|
|
AC_PREREQ([2.67])
|
2013-11-01 14:33:00 -07:00
|
|
|
AC_INIT([obs-studio], [0.0.1], [obs.jim@gmail.com])
|
2013-10-29 23:21:40 -07:00
|
|
|
AC_CONFIG_SRCDIR([libobs/obs.c])
|
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
2013-11-01 14:33:00 -07:00
|
|
|
# AC_CONFIG_HEADERS([config.h])
|
2013-10-29 23:21:40 -07:00
|
|
|
AC_CANONICAL_HOST
|
|
|
|
|
|
|
|
LT_INIT
|
|
|
|
AM_INIT_AUTOMAKE([foreign])
|
|
|
|
AM_SILENT_RULES([yes])
|
|
|
|
|
|
|
|
# Checks for programs.
|
|
|
|
AC_PROG_CC_STDC
|
2013-11-21 17:31:27 -08:00
|
|
|
AC_PROG_OBJC
|
2013-12-17 01:08:26 -08:00
|
|
|
AC_PROG_OBJCXX
|
2013-10-29 23:21:40 -07:00
|
|
|
AC_PROG_CXX
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_SED
|
|
|
|
|
|
|
|
AX_CXX_COMPILE_STDCXX_11
|
|
|
|
# AX_EXT
|
|
|
|
AX_APPEND_FLAG(["-msse2"], [CPPFLAGS])
|
|
|
|
|
2013-11-01 14:33:00 -07:00
|
|
|
# currently only x86 and x86_64 are supported architectures
|
|
|
|
case $host in
|
|
|
|
i?86*)
|
|
|
|
AM_CONDITIONAL([ARCH_X86], true)
|
|
|
|
AM_CONDITIONAL([ARCH_X86_64], false)
|
|
|
|
;;
|
|
|
|
amd64* | x86_64*)
|
|
|
|
AM_CONDITIONAL([ARCH_X86], false)
|
|
|
|
AM_CONDITIONAL([ARCH_X86_64], true)
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_MSG_ERROR([host architecture not currently supported])
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2013-10-29 23:21:40 -07:00
|
|
|
case $host_os in
|
|
|
|
mingw*)
|
|
|
|
AM_CONDITIONAL([OS_WIN], true)
|
|
|
|
AM_CONDITIONAL([OS_OSX], false)
|
|
|
|
AM_CONDITIONAL([OS_NIX], false)
|
|
|
|
;;
|
|
|
|
darwin*)
|
|
|
|
AM_CONDITIONAL([OS_WIN], false)
|
|
|
|
AM_CONDITIONAL([OS_OSX], true)
|
|
|
|
AM_CONDITIONAL([OS_NIX], false)
|
|
|
|
;;
|
|
|
|
*) #TODO - fix nix, but not with sticks, and definitely not with bricks
|
|
|
|
AM_CONDITIONAL([OS_WIN], false)
|
|
|
|
AM_CONDITIONAL([OS_OSX], false)
|
|
|
|
AM_CONDITIONAL([OS_NIX], true)
|
|
|
|
PKG_CHECK_MODULES([X11], [x11])
|
2013-12-27 18:43:28 -08:00
|
|
|
PKG_CHECK_MODULES([XINERAMA], [xinerama])
|
|
|
|
PKG_CHECK_MODULES([GTK], [gtk+-x11-2.0])
|
2013-10-29 23:21:40 -07:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2013-12-27 14:41:01 -08:00
|
|
|
# checks for ffmpeg
|
|
|
|
AC_CHECK_HEADER([libavcodec/avcodec.h], , AC_MSG_ERROR([libavcodec header not found]))
|
|
|
|
AC_CHECK_HEADER([libavformat/avformat.h], , AC_MSG_ERROR([libavformat header not found]))
|
|
|
|
AC_CHECK_HEADER([libavutil/avutil.h], , AC_MSG_ERROR([libavutil header not found]))
|
|
|
|
AC_CHECK_HEADER([libavutil/channel_layout.h], , AC_MSG_ERROR([libavutil header not found]))
|
|
|
|
AC_CHECK_HEADER([libswscale/swscale.h], , AC_MSG_ERROR([libswscale header not found]))
|
|
|
|
AC_CHECK_HEADER([libswresample/swresample.h], , AC_MSG_ERROR([libswresample header not found]))
|
|
|
|
|
2013-12-27 18:43:28 -08:00
|
|
|
AC_CHECK_LIB([avcodec], [avcodec_find_encoder_by_name], , AC_MSG_ERROR([libavcodec not found]))
|
2013-12-27 14:41:01 -08:00
|
|
|
AC_CHECK_LIB([avformat], [av_guess_format], , AC_MSG_ERROR([libavformat not found]))
|
|
|
|
AC_CHECK_LIB([avutil], [av_samples_alloc], , AC_MSG_ERROR([libavutil not found]))
|
|
|
|
AC_CHECK_LIB([swscale], [sws_scale], , AC_MSG_ERROR([libswscale not found]))
|
|
|
|
AC_CHECK_LIB([swresample], [swr_convert], , AC_MSG_ERROR([libswresample not found]))
|
|
|
|
|
2013-12-27 18:43:28 -08:00
|
|
|
# checks for jansson
|
2013-12-27 14:41:01 -08:00
|
|
|
AC_CHECK_HEADER([jansson.h], , AC_MSG_ERROR([libjansson header not found]))
|
|
|
|
AC_CHECK_LIB([jansson], [json_load_file], , AC_MSG_ERROR([libjansson not found]))
|
|
|
|
|
2013-12-27 15:22:17 -08:00
|
|
|
wxVersion=2.9.0
|
2013-12-27 14:41:01 -08:00
|
|
|
WX_CONFIG_OPTIONS
|
|
|
|
WX_CONFIG_CHECK(
|
2013-12-27 15:22:17 -08:00
|
|
|
$wxVersion, [wxWin=1], [wxWin=0,
|
2013-11-07 15:45:03 -08:00
|
|
|
AC_MSG_ERROR([
|
|
|
|
wxWidgets must be installed on your system.
|
|
|
|
|
|
|
|
Please check that wx-config is in path, the directory
|
|
|
|
where wxWidgets libraries are installed (returned by
|
|
|
|
'wx-config --libs' or 'wx-config --static --libs' command)
|
|
|
|
is in LD_LIBRARY_PATH or equivalent variable and
|
2013-12-27 15:22:17 -08:00
|
|
|
wxWidgets version is $wxVersion or above.
|
2013-12-27 14:41:01 -08:00
|
|
|
]) ],
|
2014-01-05 19:05:17 -08:00
|
|
|
[core], [--version=2.9])
|
2013-12-27 14:41:01 -08:00
|
|
|
|
2013-11-07 15:45:03 -08:00
|
|
|
CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS"
|
|
|
|
CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY"
|
2013-12-27 18:43:28 -08:00
|
|
|
CFLAGS="$CFLAGS $WX_CFLAGS_ONLY "
|
2013-11-07 15:45:03 -08:00
|
|
|
LIBS="$LIBS $WX_LIBS"
|
|
|
|
|
2013-10-29 23:21:40 -07:00
|
|
|
# Checks for header files.
|
|
|
|
AC_PATH_X
|
|
|
|
AC_CHECK_HEADERS([inttypes.h limits.h malloc.h stddef.h stdint.h stdlib.h string.h sys/timeb.h wchar.h wctype.h])
|
|
|
|
|
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
AC_HEADER_STDBOOL
|
|
|
|
AC_C_INLINE
|
|
|
|
AC_TYPE_INT16_T
|
|
|
|
AC_TYPE_INT32_T
|
|
|
|
AC_TYPE_INT64_T
|
|
|
|
AC_TYPE_INT8_T
|
|
|
|
AC_TYPE_MODE_T
|
|
|
|
AC_TYPE_OFF_T
|
|
|
|
AC_TYPE_PID_T
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
AC_TYPE_SSIZE_T
|
|
|
|
AC_TYPE_UINT16_T
|
|
|
|
AC_TYPE_UINT32_T
|
|
|
|
AC_TYPE_UINT64_T
|
|
|
|
AC_TYPE_UINT8_T
|
|
|
|
AC_CHECK_TYPES([ptrdiff_t])
|
|
|
|
|
|
|
|
# Checks for library functions.
|
|
|
|
AC_FUNC_FSEEKO
|
|
|
|
AC_FUNC_STRTOD
|
|
|
|
AC_CHECK_FUNCS([memmove memset socket strstr strtol strtoul])
|
|
|
|
|
|
|
|
AC_CONFIG_FILES([makefile
|
|
|
|
build/makefile
|
2013-11-07 15:45:03 -08:00
|
|
|
obs/makefile
|
2013-10-29 23:21:40 -07:00
|
|
|
test/makefile
|
|
|
|
test/test-input/makefile
|
|
|
|
libobs/makefile
|
|
|
|
libobs-opengl/makefile])
|
2013-11-21 17:31:27 -08:00
|
|
|
|
2013-10-29 23:21:40 -07:00
|
|
|
AC_OUTPUT
|