Explorar o código

Fixes issues with autoconf

In particular, it removes any deprecated functionality
wxWidgets only documents their deprecated m4 macros and gives a poor example
Also to note in regard to wxWidgets, I removed any unneeded libraries from the linker line.

Any warning messages provided by autoconf has been supressed in the most appropriate manner possible.
Zachary Lund %!s(int64=12) %!d(string=hai) anos
pai
achega
5f5404f8cb
Modificáronse 7 ficheiros con 31 adicións e 29 borrados
  1. 1 0
      Makefile.am
  2. 23 24
      autogen.sh
  3. 2 2
      libobs-opengl/makefile.am
  4. 2 0
      libobs/makefile.am
  5. 0 1
      makefile.am
  6. 2 1
      obs/makefile.am
  7. 1 1
      test/test-input/makefile.am

+ 1 - 0
Makefile.am

@@ -0,0 +1 @@
+ACLOCAL_AMFLAGS = -I m4

+ 23 - 24
autogen.sh

@@ -58,11 +58,26 @@ case $host_os in
 		;;
 esac
 
-# checks for wx
-AM_OPTIONS_WXCONFIG
-reqwx=2.9.0
-AM_PATH_WXCONFIG($reqwx, wxWin=1)
-if test "$wxWin" != 1; then
+# 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]))
+
+AC_CHECK_LIB([avcodec], [avcodec_find_encoder_by_name], , AC_MSG_ERROR([libavcodec not found]), )
+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]))
+
+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]))
+
+WX_CONFIG_OPTIONS
+WX_CONFIG_CHECK(
+	[2.9.0], [wxWin=1], [wxWin=0,
 	AC_MSG_ERROR([
 		wxWidgets must be installed on your system.
  
@@ -71,27 +86,14 @@ if test "$wxWin" != 1; then
 		'wx-config --libs' or 'wx-config --static --libs' command)
 		is in LD_LIBRARY_PATH or equivalent variable and
 		wxWidgets version is $reqwx or above.
-		])
-fi
- 
+		]) ],
+	[core], )
+
 CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS"
 CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY"
 CFLAGS="$CFLAGS $WX_CFLAGS_ONLY"
 LIBS="$LIBS $WX_LIBS"
 
-# 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]))
-AC_CHECK_LIB([avcodec], [avcodec_find_encoder_by_name], , AC_MSG_ERROR([libavcodec not found]))
-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]))
-
 # 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])
@@ -114,9 +116,6 @@ AC_TYPE_UINT64_T
 AC_TYPE_UINT8_T
 AC_CHECK_TYPES([ptrdiff_t])
 
-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]))
-
 # Checks for library functions.
 AC_FUNC_FSEEKO
 AC_FUNC_STRTOD

+ 2 - 2
libobs-opengl/makefile.am

@@ -1,5 +1,5 @@
-INCLUDES = -isystem$(top_srcdir)/libobs -isystem./glew/include
-AM_CFLAGS = -DGLEW_NO_GLU -DGLEW_STATIC
+AUTOMAKE_OPTIONS = subdir-objects
+AM_CFLAGS = -DGLEW_NO_GLU -DGLEW_STATIC -isystem$(top_srcdir)/libobs -isystem./glew/include
 
 if OS_WIN
 if ARCH_X86

+ 2 - 0
libobs/makefile.am

@@ -1,3 +1,5 @@
+AUTOMAKE_OPTIONS = subdir-objects
+
 if OS_WIN
 if ARCH_X86
 libobsdir = ../build/bin/32bit

+ 0 - 1
makefile.am

@@ -1,4 +1,3 @@
-ACLOCAL_AMFLAGS = -I m4
 EXTRA_DIST = autogen.sh COPYING README
 SUBDIRS = libobs libobs-opengl test obs
 

+ 2 - 1
obs/makefile.am

@@ -1,4 +1,5 @@
-INCLUDES = -I$(top_srcdir)/libobs
+AUTOMAKE_OPTIONS = subdir-objects
+AM_CPPFLAGS = -I$(top_srcdir)/libobs
 
 if OS_WIN
 if ARCH_X86_64

+ 1 - 1
test/test-input/makefile.am

@@ -1,4 +1,4 @@
-INCLUDES = -isystem$(top_srcdir)/libobs
+AM_CFLAGS = -isystem$(top_srcdir)/libobs
 
 if OS_WIN
 if ARCH_X86